#markdown #link #preprocessor #configurable #substitution #regex #shorthands

bin+lib markdown-linkify

Markdown preprocessor for substiting link shorthands to valid links according to configurable regexes and custom substitution implementations

5 unstable releases

0.3.1 Oct 1, 2023
0.3.0 Sep 21, 2023
0.2.1 Aug 27, 2023
0.2.0 Aug 23, 2023
0.1.0 Aug 23, 2023

#1530 in Text processing

Apache-2.0

29KB
674 lines

Markdown Linkify

Replace link shorthands, such as

In [PS-128], the issue is described in detail.

with actual links. For example, the above could be transformed to:

In [PS-128](https://www.company.jira.com/issues/PS-128), the issue is described in detail.

Custom replacers exist, so far only for docs.rs and doc.rust-lang.org/.

See test.md for the supported expressions.

Supports [tag]-style "broken links" and many forms of [title or empty](tag "optional hover text").

The specific replacements depend on the matching transformer.

TODO

  • code blocks in links
  • make regex replacer which can be configured by its own file
  • make regex replacer config files for the existing usecases
  • org-mode frontend for agnostic replacers
  • local rustdoc replacer
  • collect replacer ideas, github issue replacer?
  • unit tests for replacers, linkify
  • documentation
  • support composite text events
  • implement LinkMetadata as iterator
  • figure out how to publish linkify on crates.io
  • check how code insertion should actually work
  • make replacer API in linkify and make empty playground inserter work with it

Dependencies

~13–27MB
~451K SLoC