forked from 0x2620/pandora
update api docs parser
This commit is contained in:
parent
82e611dae3
commit
f5520ede2a
1 changed files with 18 additions and 17 deletions
|
@ -235,23 +235,24 @@ pandora.ui.apiDialog = function() {
|
||||||
var code = actions[id].code[1],
|
var code = actions[id].code[1],
|
||||||
source = actions[id].code[0],
|
source = actions[id].code[0],
|
||||||
line = Math.round(Ox.last(source.split(':')) || 0),
|
line = Math.round(Ox.last(source.split(':')) || 0),
|
||||||
$title = $('<h1>')
|
$code;
|
||||||
.css({paddingLeft: '4px'})
|
$('<h1>')
|
||||||
.html('<b><tt>' + id + '</tt></b>')
|
.css({paddingLeft: '4px'})
|
||||||
.appendTo($text),
|
.html('<b><tt>' + id + '</tt></b>')
|
||||||
$doc = getDoc(actions[id].doc).appendTo($text),
|
.appendTo($text),
|
||||||
$source = $('<div>')
|
getDoc(actions[id].doc).appendTo($text),
|
||||||
.css({paddingLeft: '4px'})
|
$('<div>')
|
||||||
.html('<br><b><tt>source: ' + source + '</tt></b>')
|
.css({paddingLeft: '4px'})
|
||||||
.appendTo($text),
|
.html('<br><b><tt>source: ' + source + '</tt></b>')
|
||||||
$code = Ox.SyntaxHighlighter({
|
.appendTo($text),
|
||||||
source: code.replace(/\s*?'''[\s\S]+?'''/g, ''),
|
$code = Ox.SyntaxHighlighter({
|
||||||
})
|
source: code.replace(/\s*?'''[\s\S]+?'''/g, ''),
|
||||||
.css({
|
})
|
||||||
backgroundColor: 'rgba(0, 0, 0, 0)',
|
.css({
|
||||||
borderWidth: '1px',
|
backgroundColor: 'rgba(0, 0, 0, 0)',
|
||||||
})
|
borderWidth: '1px',
|
||||||
.appendTo($text);
|
})
|
||||||
|
.appendTo($text);
|
||||||
// fix decorators
|
// fix decorators
|
||||||
$code.find('.OxError')
|
$code.find('.OxError')
|
||||||
.removeClass('OxError')
|
.removeClass('OxError')
|
||||||
|
|
Loading…
Reference in a new issue