From fea52a5495d1fadb4b16425a6bf067b7471861af Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 25 Feb 2015 09:21:01 -0500 Subject: [PATCH] API Explorer minor fix --- CRM/Admin/Page/APIExplorer.php | 2 +- templates/CRM/Admin/Page/APIExplorer.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CRM/Admin/Page/APIExplorer.php b/CRM/Admin/Page/APIExplorer.php index c99f410095..bb3d070c68 100644 --- a/CRM/Admin/Page/APIExplorer.php +++ b/CRM/Admin/Page/APIExplorer.php @@ -210,7 +210,7 @@ class CRM_Admin_Page_APIExplorer extends CRM_Core_Page { // Add unformatted code blocks back in if ($code && !empty($code[1])) { foreach ($code[1] as $block) { - $text = preg_replace('#
#', "
$block
", $text, 1); + $text = preg_replace('#
#', "
$block
", $text, 1); } } return $text; diff --git a/templates/CRM/Admin/Page/APIExplorer.js b/templates/CRM/Admin/Page/APIExplorer.js index 7fe6b73221..3a635df59e 100644 --- a/templates/CRM/Admin/Page/APIExplorer.js +++ b/templates/CRM/Admin/Page/APIExplorer.js @@ -614,6 +614,7 @@ entityDoc = result.doc; CRM.utils.setOptions($('#doc-action').prop('disabled', false).removeClass('loading'), result.actions); $('#doc-result').html(result.doc); + prettyPrint('#doc-result pre'); }); } @@ -632,10 +633,11 @@ if (result.code) { $('#doc-result').append(docCodeTpl(result)); } - prettyPrint('.api-doc-code pre'); + prettyPrint('#doc-result pre'); }); } else { $('#doc-result').html(entityDoc); + prettyPrint('#doc-result pre'); } } -- 2.25.1