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) {
|
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?
|
//XXX maybe put more stuff here?
|
||||||
return text;
|
return parts.join('`');
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseAPIHeader(text) {
|
function parseAPIHeader(text) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user