Table of Contents links using the format #link are not followed

Ján Jančár johny at neuromancer.sk
Fri Jul 13 18:39:33 CEST 2018


On 13/07/18 18:14, Christian Hesse wrote:
> jean-christophe manciot <actionmystique at gmail.com> 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: <http://lists.zx2c4.com/pipermail/cgit/attachments/20180713/5e83fae5/attachment.asc>


More information about the CGit mailing list