Skip to content

Commit

Permalink
fix escape
Browse files Browse the repository at this point in the history
  • Loading branch information
y-fujii authored and brson committed Oct 5, 2012
1 parent 016875b commit cc51b6b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions doc/prep.js
Expand Up @@ -60,9 +60,10 @@ while ((line = lines[cur++]) != null) {
var html = '<pre class="cm-s-default">', curstr = "", curstyle = null;
function add(str, style) {
if (style != curstyle) {
if (curstyle) html += '<span class="cm-' + curstyle + '">' + curstr
+ "</span>";
else if (curstr) html += curstr;
if (curstyle) html +=
'<span class="cm-' + CodeMirror.htmlEscape(curstyle) + '">' +
CodeMirror.htmlEscape(curstr) + "</span>";
else if (curstr) html += CodeMirror.htmlEscape(curstr);
curstr = str; curstyle = style;
} else curstr += str;
}
Expand Down

0 comments on commit cc51b6b

Please sign in to comment.