Permalink
Browse files

Updated converter to use pre tags rather than code.

  • Loading branch information...
JoshOrndorff committed Aug 28, 2018
1 parent 24336b2 commit 1c0ea5b0910606337d8a44e56ea4b7aec6c1da75
Showing with 6 additions and 2 deletions.
  1. +6 −2 converter/index.js
@@ -6,15 +6,19 @@ var fs = require('fs')


/////////////////////////
renderer.link = function (href, title, text) {
renderer.link = function(href, title, text) {

if (text.substring(text.length - 4) !== ".rho"){
return `<a href="${href}">${text}</a>`
}
var code = fs.readFileSync(href)


return `<code class="rholang-file">${code}</code>`
return `<pre class="rholang-file">${code}</pre>`
}

renderer.code = function(code, language, escaped){
return `<pre class="inline-code">${code}</pre>`
}


0 comments on commit 1c0ea5b

Please sign in to comment.