diff --git a/static/js/apiDialog.js b/static/js/apiDialog.js index 8c836c87..544beeaa 100644 --- a/static/js/apiDialog.js +++ b/static/js/apiDialog.js @@ -167,15 +167,18 @@ pandora.ui.apiDialog = function() { that.select = function(id) { if (id && actions[id]) { - $text.html('

' + id + '


'); + $text.html('

' + id + '


'); var code = actions[id].code[1], source = actions[id].code[0], line = Math.round(Ox.last(source.split(':')) || 0), - doc = actions[id].doc.replace('/\n/
\n/g'), + doc = actions[id].doc.replace(/\n(?=(takes|returns) \{)/g, '\n\n'), $code, $doc; $doc = Ox.SyntaxHighlighter({ source: doc, }) + .css({ + backgroundColor: 'rgba(0, 0, 0, 0)' + }) .appendTo($text); ['Keyword', 'Method', 'Property'].forEach(function(type) { $doc.find('.Ox' + type).removeClass('Ox' + type); @@ -185,9 +188,9 @@ pandora.ui.apiDialog = function() { .appendTo($text); $code = Ox.SyntaxHighlighter({ source: code.replace(/\s*?'''[\s\S]+?'''/g, ''), - offset: line }) .css({ + backgroundColor: 'rgba(0, 0, 0, 0)', borderWidth: '1px', }) .appendTo($text);