implement image link replacers
update test for link replacers
The link replacers test was still failing because I forgot to commit the
updated test data.
fix link regex in non link-only paragraphs
The current implementation of link regex only worked in link-only
paragraphs and headers. This enables them in normal paragraphs and adds
tests to ensure they keep working in the future.
document weird link print code
I spent like 30 minutes trying to simplify this shit and gave up so
here's a warning for next time.
fix link replacer for auto links
There was a typo in the linkPrint function causing all link replacers
for auto links to do absolutely nothing.
refactor tests into seperate files
This improves the readability of the tests by seperating examples,
benchmarks, and normal tests.
refactor nodeText
The nodeText helper function was accepting a pointer to a slice. Not
only is this different than all the other helper functions, but it also
isn't a performance improvement since slices are already reference
types.
remove dead code from renderHTMLBlock
add WithHorizontalRule function
The rest of the config options have helper functions, but this one was
neglected.
config option for horizontal rules
This commit adds a config option for horizontal rules. You can now print
them using any string you like, including newlines to create a codeblock
for example. This commit ALSO changes the default horizontal rule to a
blank string. Having the 80 character - as a default was not ideal for
screenreaders.
add extension information to readme
implement wiki style link support
This commit adds support for a common markdown link extension in which
links can be written as [[url|label]]. This style is popular on several
major wikis. This goldmark parser extension is used to add support:
git.sr.ht/~kota/goldmark-wiki
upgrade goldmark dependency
clean up readme description