Browse Source

workaround for errors thrown from latest version of highlight.js

https://github.com/highlightjs/highlight.js/issues/1387
fix-133-memory-crash
Dan Janosik 6 years ago
parent
commit
845ac65124
No known key found for this signature in database GPG Key ID: C6F8CE9FFDB2CED2
  1. 14
      views/address.pug
  2. 2
      views/browser.pug
  3. 8
      views/includes/block-content.pug
  4. 2
      views/mempool-summary.pug
  5. 2
      views/node-status.pug
  6. 4
      views/peers.pug
  7. 2
      views/terminal.pug
  8. 2
      views/transaction.pug
  9. 2
      views/tx-stats.pug

14
views/address.pug

@ -75,7 +75,7 @@ block content
if (false) if (false)
pre pre
code #{JSON.stringify(addressObj, null, 4)} code(class="json") #{JSON.stringify(addressObj, null, 4)}
ul(class='nav nav-tabs mb-3') ul(class='nav nav-tabs mb-3')
li(class="nav-item") li(class="nav-item")
@ -152,7 +152,7 @@ block content
if (false) if (false)
pre pre
code #{JSON.stringify(firstSeenTransaction)} code(class="json") #{JSON.stringify(firstSeenTransaction)}
if (balance) if (balance)
if (balance.conflictedResults) if (balance.conflictedResults)
@ -287,7 +287,7 @@ block content
each tx, txIndex in transactions each tx, txIndex in transactions
//pre //pre
// code #{JSON.stringify(tx, null, 4)} // code(class="json") #{JSON.stringify(tx, null, 4)}
div(class="xcard mb-3") div(class="xcard mb-3")
div(class="card-header monospace clearfix") div(class="card-header monospace clearfix")
div(class="float-left", style="margin-right: 0px;") div(class="float-left", style="margin-right: 0px;")
@ -344,7 +344,7 @@ block content
if (false) if (false)
pre pre
code #{JSON.stringify(transactions, null, 4)} code(class="json") #{JSON.stringify(transactions, null, 4)}
if (!crawlerBot && txids && txids.length > limit) if (!crawlerBot && txids && txids.length > limit)
- var pageNumber = offset / limit + 1; - var pageNumber = offset / limit + 1;
@ -367,15 +367,15 @@ block content
div(class="highlight") div(class="highlight")
h4 Node.ValidateAddress h4 Node.ValidateAddress
pre 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) if (config.electrumXServers && config.electrumXServers.length > 0)
h4 Electrum.Balance h4 Electrum.Balance
pre 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 h4 Electrum.History
pre 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
views/browser.pug

@ -41,7 +41,7 @@ block content
h5(class="mt-3") Result h5(class="mt-3") Result
pre(style="border: solid 1px #ccc;") pre(style="border: solid 1px #ccc;")
code #{JSON.stringify(methodResult, null, 4)} code(class="json") #{JSON.stringify(methodResult, null, 4)}
hr hr

8
views/includes/block-content.pug

@ -210,7 +210,7 @@ div(class="tab-content")
div(class="card-body") div(class="card-body")
each tx, txIndex in result.transactions each tx, txIndex in result.transactions
//pre //pre
// code #{JSON.stringify(tx, null, 4)} // code(class="json") #{JSON.stringify(tx, null, 4)}
div(class="xcard mb-3") div(class="xcard mb-3")
div(class="card-header monospace") div(class="card-header monospace")
if (tx && tx.txid) if (tx && tx.txid)
@ -225,7 +225,7 @@ div(class="tab-content")
div(class="card-body") div(class="card-body")
//pre //pre
// code #{JSON.stringify(result.txInputsByTransaction[tx.txid], null, 4)} // code(class="json") #{JSON.stringify(result.txInputsByTransaction[tx.txid], null, 4)}
if (true) if (true)
- var txInputs = result.txInputsByTransaction[tx.txid]; - var txInputs = result.txInputsByTransaction[tx.txid];
- var blockHeight = result.getblock.height; - var blockHeight = result.getblock.height;
@ -233,7 +233,7 @@ div(class="tab-content")
include ./transaction-io-details.pug include ./transaction-io-details.pug
//pre //pre
// code #{JSON.stringify(tx, null, 4)} // code(class="json") #{JSON.stringify(tx, null, 4)}
if (!crawlerBot && txCount > limit) if (!crawlerBot && txCount > limit)
- var pageNumber = offset / limit + 1; - var pageNumber = offset / limit + 1;
@ -251,5 +251,5 @@ div(class="tab-content")
div(id="tab-json", class="tab-pane", role="tabpanel") div(id="tab-json", class="tab-pane", role="tabpanel")
pre pre
code #{JSON.stringify(result.getblock, null, 4)} code(class="json") #{JSON.stringify(result.getblock, null, 4)}

2
views/mempool-summary.pug

@ -9,7 +9,7 @@ block content
if (false) if (false)
pre pre
code #{JSON.stringify(mempoolstats, null, 4)} code(class="json") #{JSON.stringify(mempoolstats, null, 4)}
if (true) if (true)
div(class="card mb-3 shadow-sm") div(class="card mb-3 shadow-sm")

2
views/node-status.pug

@ -18,7 +18,7 @@ block content
if (false) if (false)
pre pre
code #{JSON.stringify(getblockchaininfo, null, 4)} code(class="json") #{JSON.stringify(getblockchaininfo, null, 4)}
if (global.client) if (global.client)
div(class="card mb-3 shadow-sm") div(class="card mb-3 shadow-sm")

4
views/peers.pug

@ -126,14 +126,14 @@ block content
div(style="display: none;", id=("peerinfo_" + index), class="p-3") div(style="display: none;", id=("peerinfo_" + index), class="p-3")
h6 Peer Details h6 Peer Details
pre 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(":"))]) if (peerIpSummary.detailsByIp[item.addr.substring(0, item.addr.lastIndexOf(":"))])
hr hr
h6 IP Geo-Location Info h6 IP Geo-Location Info
pre 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 block endOfBody

2
views/terminal.pug

@ -51,7 +51,7 @@ block endOfBody
function(response, textStatus, jqXHR) { function(response, textStatus, jqXHR) {
var t = new Date().getTime(); 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); console.log(response);
$("#output-" + t + " pre code").each(function(i, block) { $("#output-" + t + " pre code").each(function(i, block) {

2
views/transaction.pug

@ -292,7 +292,7 @@ block content
div(id="tab-json", class="tab-pane", role="tabpanel") div(id="tab-json", class="tab-pane", role="tabpanel")
div(class="highlight") div(class="highlight")
pre 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)} //pre #{JSON.stringify(result.txInputs, null, 4)}

2
views/tx-stats.pug

@ -9,7 +9,7 @@ block content
if (false) if (false)
pre pre
code #{JSON.stringify(txStatResults, null, 4)} code(class="json") #{JSON.stringify(txStatResults, null, 4)}
if (true) if (true)
if (false) if (false)

Loading…
Cancel
Save