diff --git a/static/js/apiDialog.js b/static/js/apiDialog.js index 9d32f86cf..9e018415e 100644 --- a/static/js/apiDialog.js +++ b/static/js/apiDialog.js @@ -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, '$1') + $doc.html().replace(/BOLD([\w:]+)BOLD/g, '$1') ); parts = $doc.html().split('notes'); if (parts.length == 2) { parts_ = parts[1].split('see'); - if (len(parts_) == 2) { + if (parts_.length == 2) { parts_[0] = parts_[0].replace(/\n\s+?/g, ' '); parts[1] = parts_.join('see'); } else {