Conversation
|
Thanks so much for this! Linkifying HTML is a common enough general problem that I've actually been doing it with an external script: // linkify.js
var linkify = require('html-linkify')
var input = require('fs').readFileSync('/dev/stdin').toString()
process.stdout.write(linkify(input, { escape: false }))Then: $ commonform render -f html < agreement.commonform | node linkify.js > agreement.htmlIncidentally, linkify handles e-mail addresses. It's a nice, tight package. Three questions in my mind:
Again, thanks so much. I will have a think today or tomorrow. Would love to read your thoughts, too! |
|
I can't think of a reason not to linkify HTML. Maybe a better approach is to use that library as a post-processing step at the end of the HTML rendering. |
|
I've squinted at this for a while, but don't yet understand why the test fails. 😠 Instead of: it produces: |
Adding links to the HTML was way easier than the .DOCX, so I tacked it first.