Crate markdown_linkify

Source
Expand description

§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

Modules§

aggregation
docs_rustlang_replacer
docsrs_replacer
link
link_aggregator
substitution

Structs§

Transformers

Traits§

LinkTransformer
If a link transformer matches on a tag, it shall produce a meaningful regex-substituted transformation.

Functions§

broken_link_callback_with_replacers
process_broken_links
process_links