Merge pull request #798 from bootstraponline/master
static_highlight should enable control over gutter rendering
This commit is contained in:
commit
eac7f7c81a
1 changed files with 3 additions and 2 deletions
|
|
@ -52,7 +52,7 @@ var baseStyles = require("../requirejs/text!./static.css");
|
||||||
* @returns {object} An object containing: html, css
|
* @returns {object} An object containing: html, css
|
||||||
*/
|
*/
|
||||||
|
|
||||||
exports.render = function(input, mode, theme, lineStart) {
|
exports.render = function(input, mode, theme, lineStart, disableGutter) {
|
||||||
lineStart = parseInt(lineStart || 1, 10);
|
lineStart = parseInt(lineStart || 1, 10);
|
||||||
|
|
||||||
var session = new EditSession("");
|
var session = new EditSession("");
|
||||||
|
|
@ -74,6 +74,7 @@ exports.render = function(input, mode, theme, lineStart) {
|
||||||
for(var ix = 0; ix < length; ix++) {
|
for(var ix = 0; ix < length; ix++) {
|
||||||
var lineTokens = session.getTokens(ix);
|
var lineTokens = session.getTokens(ix);
|
||||||
stringBuilder.push("<div class='ace_line'>");
|
stringBuilder.push("<div class='ace_line'>");
|
||||||
|
if (!disableGutter)
|
||||||
stringBuilder.push("<span class='ace_gutter ace_gutter-cell' unselectable='on'>" + (ix + lineStart) + "</span>");
|
stringBuilder.push("<span class='ace_gutter ace_gutter-cell' unselectable='on'>" + (ix + lineStart) + "</span>");
|
||||||
textLayer.$renderLine(stringBuilder, 0, lineTokens, true);
|
textLayer.$renderLine(stringBuilder, 0, lineTokens, true);
|
||||||
stringBuilder.push("</div>");
|
stringBuilder.push("</div>");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue