Chromium Code Reviews| Index: Source/devtools/front_end/documentation/DocumentationView.js |
| diff --git a/Source/devtools/front_end/documentation/DocumentationView.js b/Source/devtools/front_end/documentation/DocumentationView.js |
| index 83bf923c636577c67cc82fd433ac1fd728ad8761..32047adf9cc199c8ce834111be79d41ce4e05b60 100644 |
| --- a/Source/devtools/front_end/documentation/DocumentationView.js |
| +++ b/Source/devtools/front_end/documentation/DocumentationView.js |
| @@ -27,6 +27,11 @@ WebInspector.DocumentationView.showDocumentationURL = function(url, searchItem) |
| view._revealTermDocument(url, searchItem); |
| } |
| +WebInspector.DocumentationView._languageToMimeType = { |
| + "JavaScript": "text/javascript", |
| + "HTML": "text/html" |
| +} |
|
lushnikov
2014/09/03 15:10:25
semicolon
semeny
2014/09/03 15:34:27
Done.
|
| + |
| WebInspector.DocumentationView.prototype = { |
| /** |
| * @param {string} url |
| @@ -208,6 +213,8 @@ WebInspector.DocumentationView.Renderer.prototype = { |
| var code = example.createChild("div", "documentation-example-code"); |
| code.classList.add("source-code"); |
| code.textContent = examples[i].code; |
| + var syntaxHighlighter = new WebInspector.DOMSyntaxHighlighter(WebInspector.DocumentationView._languageToMimeType[examples[i].language], true); |
|
lushnikov
2014/09/03 15:10:25
what if they pass JAVASCRIPT in there? this gonna
semeny
2014/09/03 15:34:27
Done.
|
| + syntaxHighlighter.syntaxHighlightNode(code); |
| } |
| }, |