mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
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>
This commit is contained in:
parent
c7f5c98ee9
commit
103b89673e
@ -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…
Reference in New Issue
Block a user