Browse Source

doc: skip type parsing inside code blocks

Since types are denoted with curly braces it can cause erroneous
replaces in code blocks.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
v0.11.11-release
Vladimir Kurchatkin 11 years ago
committed by Trevor Norris
parent
commit
103b89673e
  1. 10
      tools/doc/html.js

10
tools/doc/html.js

@ -122,9 +122,15 @@ function parseLists(input) {
function parseListItem(text) {
text = text.replace(/\{([^\}]+)\}/, '<span class="type">$1</span>');
var parts = text.split('`');
var i;
for (i = 0; i < parts.length; i += 2) {
parts[i] = parts[i].replace(/\{([^\}]+)\}/, '<span class="type">$1</span>');
}
//XXX maybe put more stuff here?
return text;
return parts.join('`');
}
function parseAPIHeader(text) {

Loading…
Cancel
Save