Nim/lib/core
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
..
hotcodereloading.nim style fix: change 'JS' to 'js' to make it consistent (#13168) 2020-01-16 14:14:03 +01:00
locks.nim Revert "fix #14873 properly by skipping abi field in importc type (#17944)" (#17992) 2021-05-15 06:50:39 +02:00
macrocache.nim macrocache.nim: removed trailing whitespace 2021-04-11 20:14:44 +02:00
macros.nim Implement Pandoc Markdown concise link extension (#20304) 2022-09-04 14:52:21 -04:00
rlocks.nim sync with the same template from locks module (#18414) 2021-07-10 08:41:07 +02:00
typeinfo.nim fixes #18878 (#18883) 2021-09-25 14:17:41 +02:00