From 845ac651240e986f9784167e3962a323901e0a53 Mon Sep 17 00:00:00 2001 From: Dan Janosik Date: Mon, 18 Feb 2019 13:14:00 -0500 Subject: [PATCH] workaround for errors thrown from latest version of highlight.js https://github.com/highlightjs/highlight.js/issues/1387 --- views/address.pug | 14 +++++++------- views/browser.pug | 2 +- views/includes/block-content.pug | 8 ++++---- views/mempool-summary.pug | 2 +- views/node-status.pug | 2 +- views/peers.pug | 4 ++-- views/terminal.pug | 2 +- views/transaction.pug | 2 +- views/tx-stats.pug | 2 +- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/views/address.pug b/views/address.pug index fcf99f7..59dc799 100644 --- a/views/address.pug +++ b/views/address.pug @@ -75,7 +75,7 @@ block content if (false) pre - code #{JSON.stringify(addressObj, null, 4)} + code(class="json") #{JSON.stringify(addressObj, null, 4)} ul(class='nav nav-tabs mb-3') li(class="nav-item") @@ -152,7 +152,7 @@ block content if (false) pre - code #{JSON.stringify(firstSeenTransaction)} + code(class="json") #{JSON.stringify(firstSeenTransaction)} if (balance) if (balance.conflictedResults) @@ -287,7 +287,7 @@ block content each tx, txIndex in transactions //pre - // code #{JSON.stringify(tx, null, 4)} + // code(class="json") #{JSON.stringify(tx, null, 4)} div(class="xcard mb-3") div(class="card-header monospace clearfix") div(class="float-left", style="margin-right: 0px;") @@ -344,7 +344,7 @@ block content if (false) pre - code #{JSON.stringify(transactions, null, 4)} + code(class="json") #{JSON.stringify(transactions, null, 4)} if (!crawlerBot && txids && txids.length > limit) - var pageNumber = offset / limit + 1; @@ -367,15 +367,15 @@ block content div(class="highlight") h4 Node.ValidateAddress pre - code(class="language-json", data-lang="json") #{JSON.stringify(result.validateaddress, null, 4)} + code(class="json", data-lang="json") #{JSON.stringify(result.validateaddress, null, 4)} if (config.electrumXServers && config.electrumXServers.length > 0) h4 Electrum.Balance pre - code(class="language-json", data-lang="json") #{JSON.stringify(electrumBalance, null, 4)} + code(class="json", data-lang="json") #{JSON.stringify(electrumBalance, null, 4)} h4 Electrum.History pre - code(class="language-json", data-lang="json") #{JSON.stringify(electrumHistory, null, 4)} + code(class="json", data-lang="json") #{JSON.stringify(electrumHistory, null, 4)} diff --git a/views/browser.pug b/views/browser.pug index 7e72ef7..db0af40 100644 --- a/views/browser.pug +++ b/views/browser.pug @@ -41,7 +41,7 @@ block content h5(class="mt-3") Result pre(style="border: solid 1px #ccc;") - code #{JSON.stringify(methodResult, null, 4)} + code(class="json") #{JSON.stringify(methodResult, null, 4)} hr diff --git a/views/includes/block-content.pug b/views/includes/block-content.pug index 69742fd..879dde7 100644 --- a/views/includes/block-content.pug +++ b/views/includes/block-content.pug @@ -210,7 +210,7 @@ div(class="tab-content") div(class="card-body") each tx, txIndex in result.transactions //pre - // code #{JSON.stringify(tx, null, 4)} + // code(class="json") #{JSON.stringify(tx, null, 4)} div(class="xcard mb-3") div(class="card-header monospace") if (tx && tx.txid) @@ -225,7 +225,7 @@ div(class="tab-content") div(class="card-body") //pre - // code #{JSON.stringify(result.txInputsByTransaction[tx.txid], null, 4)} + // code(class="json") #{JSON.stringify(result.txInputsByTransaction[tx.txid], null, 4)} if (true) - var txInputs = result.txInputsByTransaction[tx.txid]; - var blockHeight = result.getblock.height; @@ -233,7 +233,7 @@ div(class="tab-content") include ./transaction-io-details.pug //pre - // code #{JSON.stringify(tx, null, 4)} + // code(class="json") #{JSON.stringify(tx, null, 4)} if (!crawlerBot && txCount > limit) - var pageNumber = offset / limit + 1; @@ -251,5 +251,5 @@ div(class="tab-content") div(id="tab-json", class="tab-pane", role="tabpanel") pre - code #{JSON.stringify(result.getblock, null, 4)} + code(class="json") #{JSON.stringify(result.getblock, null, 4)} diff --git a/views/mempool-summary.pug b/views/mempool-summary.pug index 6048062..656af26 100644 --- a/views/mempool-summary.pug +++ b/views/mempool-summary.pug @@ -9,7 +9,7 @@ block content if (false) pre - code #{JSON.stringify(mempoolstats, null, 4)} + code(class="json") #{JSON.stringify(mempoolstats, null, 4)} if (true) div(class="card mb-3 shadow-sm") diff --git a/views/node-status.pug b/views/node-status.pug index b7c0e11..00a6d91 100644 --- a/views/node-status.pug +++ b/views/node-status.pug @@ -18,7 +18,7 @@ block content if (false) pre - code #{JSON.stringify(getblockchaininfo, null, 4)} + code(class="json") #{JSON.stringify(getblockchaininfo, null, 4)} if (global.client) div(class="card mb-3 shadow-sm") diff --git a/views/peers.pug b/views/peers.pug index edfc5aa..5de3aea 100644 --- a/views/peers.pug +++ b/views/peers.pug @@ -126,14 +126,14 @@ block content div(style="display: none;", id=("peerinfo_" + index), class="p-3") h6 Peer Details pre - code #{JSON.stringify(item, null, 4)} + code(class="json") #{JSON.stringify(item, null, 4)} if (peerIpSummary.detailsByIp[item.addr.substring(0, item.addr.lastIndexOf(":"))]) hr h6 IP Geo-Location Info pre - code #{JSON.stringify(peerIpSummary.detailsByIp[item.addr.substring(0, item.addr.lastIndexOf(":"))], null, 4)} + code(class="json") #{JSON.stringify(peerIpSummary.detailsByIp[item.addr.substring(0, item.addr.lastIndexOf(":"))], null, 4)} block endOfBody diff --git a/views/terminal.pug b/views/terminal.pug index 1299933..75a8fab 100644 --- a/views/terminal.pug +++ b/views/terminal.pug @@ -51,7 +51,7 @@ block endOfBody function(response, textStatus, jqXHR) { var t = new Date().getTime(); - $("#terminal-output").prepend("
" + cmd + "
" + response + "
"); + $("#terminal-output").prepend("
" + cmd + "
" + response + "
"); console.log(response); $("#output-" + t + " pre code").each(function(i, block) { diff --git a/views/transaction.pug b/views/transaction.pug index 75c849e..d12edb3 100644 --- a/views/transaction.pug +++ b/views/transaction.pug @@ -292,7 +292,7 @@ block content div(id="tab-json", class="tab-pane", role="tabpanel") div(class="highlight") pre - code(class="language-json", data-lang="json") #{JSON.stringify(result.getrawtransaction, null, 4)} + code(class="json", data-lang="json") #{JSON.stringify(result.getrawtransaction, null, 4)} //pre #{JSON.stringify(result.txInputs, null, 4)} diff --git a/views/tx-stats.pug b/views/tx-stats.pug index 2f413ab..bcf579c 100644 --- a/views/tx-stats.pug +++ b/views/tx-stats.pug @@ -9,7 +9,7 @@ block content if (false) pre - code #{JSON.stringify(txStatResults, null, 4)} + code(class="json") #{JSON.stringify(txStatResults, null, 4)} if (true) if (false)