parse-hyperlinks 0.12.0

A Nom parser library for hyperlinks with markup.
Documentation

Parse hyperlinks

A parser library written with Nom to recognize hyperlinks in Markdown, reStructuredText and HTML formatted text input.

Cargo Documentation License

The library implements the CommonMark Specification 0.29, reStructuredText Markup Specification (revision 8571, date 2020-10-28), the specifications in Asciidoctor User Manual, chapter 26 (date 2020-12-03) and HTML 5.2: section 4.5.

To illustrate the usage and the API of the library, parse-hyperlinks comes also with a simple command line application.

Installation:

cargo install parse-hyperlinks

Usage example:

$ cat input.txt
abc [my blog](https://getreu.net "blog title")abc
   [my blog]: https://getreu.net "blog title"
abc`my blog <https://getreu.net>`_abc
  .. _my blog: https://get
     reu.net
<a href="https://getreu.net" title="blog title">my blog</a>
abc https://getreu.net[my blog]abc
$ ./parse-hyperlinks <input.txt >ouput.html
$ cat ouput.html
<a href="https://getreu.net" title="blog title">my blog</a><br/>
<a href="https://getreu.net" title="blog title">my blog</a><br/>
<a href="https://getreu.net" title="">my blog</a><br/>
<a href="https://getreu.net" title="">my blog</a><br/>
<a href="https://getreu.net" title="blog title">my blog</a><br/>
<a href="https://getreu.net" title="">my blog</a><br/>
$