Files
Nim/compiler
Andrey Makarov de9cbf6af1 Fix auto links to subheader when TOC is present (#20279)
Fix links to subheader when TOC is present

It was observed (in https://github.com/nim-lang/Nim/pull/20112)
that links to 2nd- (and subsequent) -level headings
fail if TOC is present, e.g.:
```nim
.. contents::

Type relations
==============

Convertible relation
--------------------

Ref. `Convertible relation`_
```

The problem here is that links are resolved in `rst.nim` but later
`rstgen.nim` fixes ("fixes") anchors to make them unique so that
TOC always works (if e.g. there was another sub-section like
"Convertible relation").
The solution implemented in this PR is to move that fix-up of anchors
into `rst.nim`, so that link resolution could know final anchors.

The bug seems to be added in https://github.com/nim-lang/Nim/pull/2332
in 2015, that is it is present in Nim 1.0.
2022-08-27 17:28:26 -04:00
..
2022-03-20 14:02:44 +01:00
2021-03-19 16:53:38 +01:00
2017-01-07 22:35:09 +01:00
2022-03-23 20:34:53 +01:00
2019-11-28 17:13:04 +01:00
2021-05-20 15:48:46 +02:00
2021-01-12 09:36:51 +01:00
2022-03-23 20:34:53 +01:00
2019-09-27 07:02:54 +02:00
2022-01-04 11:10:46 +01:00
2022-07-15 19:56:05 +02:00
2021-01-07 20:26:40 +01:00
2021-04-07 19:54:28 +02:00
2020-11-10 21:53:25 +01:00
2022-08-24 13:38:30 +02:00

Nim Compiler

  • This directory contains the Nim compiler written in Nim.
  • Note that this code has been translated from a bootstrapping version written in Pascal.
  • So the code is not a poster child of good Nim code.

See Internals of the Nim Compiler for more information.