Nim/lib/impure
Andrey Makarov cde6b2aab8
Implement Pandoc Markdown concise link extension (#20304)
* Implement Pandoc Markdown concise link extension

This implements https://github.com/nim-lang/Nim/issues/20127.
Besides reference to headings we also support doing references
to Nim symbols inside Nim modules.

Markdown:
```
Some heading
------------

Ref. [Some heading].
```

Nim:
```
proc someFunction*() ...

... ## Ref. [someFunction]
```

This is substitution for RST syntax like `` `target`_ ``.
All 3 syntax variants of extension from Pandoc Markdown are supported:
`[target]`, `[target][]`, `[description][target]`.

This PR also fixes clashes in existing files, particularly
conflicts with RST footnote feature, which does not work with
this PR (but there is a plan to adopt a popular [Markdown footnote
extension](https://pandoc.org/MANUAL.html#footnotes) to make footnotes work).

Also the PR fixes a bug that Markdown links did not work when `[...]`
section had a line break.

The implementation is straightforward since link resolution did not
change w.r.t. RST implementation, it's almost only about new syntax
addition. The only essential difference is a possibility to add a custom
link description: form `[description][target]` which does not have an
RST equivalent.

* fix nim 1.0 gotcha
2022-09-04 14:52:21 -04:00
..
nre fixes #13654 2020-03-16 23:00:43 +01:00
db_mysql.nim Implement Pandoc Markdown concise link extension (#20304) 2022-09-04 14:52:21 -04:00
db_odbc.nim Implement Pandoc Markdown concise link extension (#20304) 2022-09-04 14:52:21 -04:00
db_postgres.nim Implement Pandoc Markdown concise link extension (#20304) 2022-09-04 14:52:21 -04:00
db_sqlite.nim make implicit cstring conversions explicit (#19488) 2022-08-19 15:40:53 -04:00
nre.nim fix typo in nre.nim (#19915) 2022-06-21 09:53:46 +08:00
rdstdin.nim fix not flushing stdout in MSYS (#19590) 2022-03-07 17:21:42 +08:00
re.nim fix bug #14468 zero-width split (#19248) 2021-12-13 07:29:22 +01:00