From 72830e70b89ae1f2dd387a359f4ad07ee6865e20 Mon Sep 17 00:00:00 2001 From: rolux Date: Thu, 18 Dec 2014 14:30:06 +0000 Subject: [PATCH] update api docs parser --- static/js/apiDialog.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/static/js/apiDialog.js b/static/js/apiDialog.js index 50d2755b..9d32f86c 100644 --- a/static/js/apiDialog.js +++ b/static/js/apiDialog.js @@ -132,14 +132,14 @@ pandora.ui.apiDialog = function() { source: string.replace( /\n(?=(takes \{|returns \{|note: |see: ))/g, '\n\n' ).replace( - /(takes|returns|note|see)(?=( \{|: ))/g, 'BOLD$1BOLD' + /(takes|returns|notes|see)(?=( \{|: ))/g, 'BOLD$1BOLD' ).replace( /`/g, 'BOLD' ) }) .css({backgroundColor: 'rgba(0, 0, 0, 0)'}), parts, parts_, - str = ',' + separator = ',' + ' '; ['Keyword', 'Method', 'Property'].forEach(function(type) { $doc.find('.Ox' + type).removeClass('Ox' + type); @@ -160,11 +160,12 @@ pandora.ui.apiDialog = function() { } parts = $doc.html().split('see'); if (parts.length == 2) { - parts[1] = parts[1].replace(/\n\s+?/, '').split(str).map( + parts[1] = parts[1].replace(/\n\s+?/, '').split(separator).map( function(action) { - return '' + action + ''; + return '' + + action + ''; } - ).join(str); + ).join(separator); $doc.html(parts.join('see')); } pandora.createLinks($doc);