Skip to content

Commit

Permalink
workaround for errors thrown from latest version of highlight.js
Browse files Browse the repository at this point in the history
  • Loading branch information
janoside committed Feb 18, 2019
1 parent 56c646c commit 845ac65
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 19 deletions.
14 changes: 7 additions & 7 deletions views/address.pug
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -152,7 +152,7 @@ block content

if (false)
pre
code #{JSON.stringify(firstSeenTransaction)}
code(class="json") #{JSON.stringify(firstSeenTransaction)}

if (balance)
if (balance.conflictedResults)
Expand Down Expand Up @@ -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;")
Expand Down Expand Up @@ -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;
Expand All @@ -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)}


2 changes: 1 addition & 1 deletion views/browser.pug
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions views/includes/block-content.pug
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -225,15 +225,15 @@ 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;

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;
Expand All @@ -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)}

2 changes: 1 addition & 1 deletion views/mempool-summary.pug
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion views/node-status.pug
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions views/peers.pug
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion views/terminal.pug
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ block endOfBody
function(response, textStatus, jqXHR) {
var t = new Date().getTime();

$("#terminal-output").prepend("<div id='output-" + t + "' class='card mb-3 shadow-sm'><div class='card-body'><h5>" + cmd + "</h5><pre><code>" + response + "</code></pre></div></div>");
$("#terminal-output").prepend("<div id='output-" + t + "' class='card mb-3 shadow-sm'><div class='card-body'><h5>" + cmd + "</h5><pre><code class='json'>" + response + "</code></pre></div></div>");
console.log(response);

$("#output-" + t + " pre code").each(function(i, block) {
Expand Down
2 changes: 1 addition & 1 deletion views/transaction.pug
Original file line number Diff line number Diff line change
Expand Up @@ -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)}
Expand Down
2 changes: 1 addition & 1 deletion views/tx-stats.pug
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 845ac65

Please sign in to comment.