diff --git a/lib/ace/ext/static.css b/lib/ace/ext/static.css index c080b575..bd479780 100644 --- a/lib/ace/ext/static.css +++ b/lib/ace/ext/static.css @@ -1,20 +1,21 @@ -.ace_editor { - font-family: 'Monaco', 'Menlo', 'Droid Sans Mono', 'Courier New', monospace; +.ace_static_highlight { + font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', 'Droid Sans Mono', monospace; font-size: 12px; } -.ace_editor .ace_gutter { +.ace_static_highlight .ace_gutter { width: 25px !important; display: block; float: left; text-align: right; padding: 0 3px 0 0; margin-right: 3px; + position: static !important; } -.ace_line { clear: both; } +.ace_static_highlight .ace_line { clear: both; } -*.ace_gutter-cell { +.ace_static_highlight .ace_gutter-cell { -moz-user-select: -moz-none; -khtml-user-select: none; -webkit-user-select: none; diff --git a/lib/ace/ext/static_highlight.js b/lib/ace/ext/static_highlight.js index fee64552..92fa8e68 100644 --- a/lib/ace/ext/static_highlight.js +++ b/lib/ace/ext/static_highlight.js @@ -121,7 +121,7 @@ exports.renderSync = function(input, mode, theme, lineStart, disableGutter) { // let's prepare the whole html var html = "
" + - "
" + + "
" + stringBuilder.join("") + "
" + "
"; diff --git a/lib/ace/ext/static_highlight_test.js b/lib/ace/ext/static_highlight_test.js index 1a0dd7cf..8e300555 100644 --- a/lib/ace/ext/static_highlight_test.js +++ b/lib/ace/ext/static_highlight_test.js @@ -27,7 +27,7 @@ function hello (a, b, c) {\n\ var mode = new JavaScriptMode(); var result = highlighter.render(snippet, mode, theme); - assert.equal(result.html, "
1/**\xa0this\xa0is\xa0a\xa0function
2*
3*/
4function\xa0hello\xa0(a,\xa0b,\xa0c)\xa0{
5\xa0\xa0\xa0\xa0console.log(a\xa0*\xa0b\xa0+\xa0c\xa0+\xa0'sup?');
6}
"); + assert.equal(result.html, "
1/**\xa0this\xa0is\xa0a\xa0function
2*
3*/
4function\xa0hello\xa0(a,\xa0b,\xa0c)\xa0{
5\xa0\xa0\xa0\xa0console.log(a\xa0*\xa0b\xa0+\xa0c\xa0+\xa0'sup?');
6}
"); assert.ok(!!result.css); next(); },