-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add automatic hyperlinks #1
base: main
Are you sure you want to change the base?
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.html Incidentally, 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.