forked from 0x2620/pandora
update api docs parser
This commit is contained in:
parent
72830e70b8
commit
60dda6d3af
1 changed files with 5 additions and 3 deletions
|
@ -132,7 +132,9 @@ pandora.ui.apiDialog = function() {
|
|||
source: string.replace(
|
||||
/\n(?=(takes \{|returns \{|note: |see: ))/g, '\n\n'
|
||||
).replace(
|
||||
/(takes|returns|notes|see)(?=( \{|: ))/g, 'BOLD$1BOLD'
|
||||
/(takes|returns)(?=( \{))/g, 'BOLD$1BOLD'
|
||||
).replace(
|
||||
/(notes:|see:)(?=( ))/g, 'BOLD$1BOLD'
|
||||
).replace(
|
||||
/`/g, 'BOLD'
|
||||
)
|
||||
|
@ -145,12 +147,12 @@ pandora.ui.apiDialog = function() {
|
|||
$doc.find('.Ox' + type).removeClass('Ox' + type);
|
||||
});
|
||||
$doc.html(
|
||||
$doc.html().replace(/BOLD(\w+)BOLD/g, '<b>$1</b>')
|
||||
$doc.html().replace(/BOLD([\w:]+)BOLD/g, '<b>$1</b>')
|
||||
);
|
||||
parts = $doc.html().split('<b>notes</b>');
|
||||
if (parts.length == 2) {
|
||||
parts_ = parts[1].split('<b>see</b>');
|
||||
if (len(parts_) == 2) {
|
||||
if (parts_.length == 2) {
|
||||
parts_[0] = parts_[0].replace(/\n\s+?/g, ' ');
|
||||
parts[1] = parts_.join('<b>see</b>');
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue