From mboxrd@z Thu Jan 1 00:00:00 1970 From: johny at neuromancer.sk (=?UTF-8?B?SsOhbiBKYW7EjcOhcg==?=) Date: Fri, 13 Jul 2018 18:39:33 +0200 Subject: Table of Contents links using the format #link are not followed In-Reply-To: <20180713181451.3c53649a@leda> References: <20180713181451.3c53649a@leda> Message-ID: <3a319dc2-9a3e-61d2-dbc1-4bcec8f806e6@neuromancer.sk> On 13/07/18 18:14, Christian Hesse wrote: > jean-christophe manciot on Fri, 2018/07/06 11:56: >> Ubuntu 18.10 >> cgit commit 22583c4 >> git 2.18.0-1 >> >> For instance, the following table of contents successfully tested on gitlab >> is useless on cgit: >> ## Table of Contents >> >> + [Drive Repository Contents](#drive-repository-contents) >> + [Features](#features) >> ... >> >> ## Drive Repository Contents >> >> ... >> >> ## Features >> >> Clicking on one of the table of contents link should redirect the user to >> the corresponding paragraph, but it does not. >> Either I'm missing something, or that feature is not implemented (yet?), or >> there is some kind of issue. > > The links are ok, but python-markdown does not add the anchors in links > (a-tags). Anybody familiar with python-markdown can tell if that can be > changed? > There is an extension for python-markdown that does this, it is also able to produce a table of contents dynamically: https://python-markdown.github.io/extensions/toc/ Cheers, -- Jan ______________________________________________________ /\ # PGP: 362056ADA8F2F4E421565EF87F4A448FE68F329D /__\ # https://neuromancer.sk /\ /\ # Eastern Seaboard Phishing Authority /__\/__\ # -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: