Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic section anchors #19

Closed
jecisc opened this issue Sep 3, 2015 · 5 comments
Closed

Automatic section anchors #19

jecisc opened this issue Sep 3, 2015 · 5 comments

Comments

@jecisc
Copy link
Member

jecisc commented Sep 3, 2015

Each section title should automatically generate an implicit hyperlink target (aka, anchor) pointing to the section. The text of the hyperlink target (the "reference name") is the same as that of the section title.

@YannDub
Copy link
Contributor

YannDub commented Apr 6, 2016

The users could enable or disable this enhancement ? Because I think for a static web site it could be better to choose.

@DamienCassou
Copy link
Contributor

ok for me

@YannDub
Copy link
Contributor

YannDub commented Apr 6, 2016

It's done with :

  • Pillar-ExporterCore-YannDubois.264
  • Pillar-Model-YannDubois.246

and tests :

  • Pillar-Tests-Model-YannDubois.181

A todo is stay, because it's possible to have duplicated anchors

@YannDub
Copy link
Contributor

YannDub commented Apr 8, 2016

I work on the duplicated anchors, and for now, the automatic generated anchors name are always encoded like :
anchorName@occurence

  • anchorName : the name of the anchor.
  • @ : a character to separate the name and the occurence.
  • occurence : the actual number (when I browse the tree) of the anchor.

But this way don't work when we have already an anchor with a name which will be generated, for example (in html) :

<h1>Test</h1>
....
<a id='Test@1'></a>

It will render after transformation :

<h1>Test</h1>
<a id='Test@1'></a>
....
<a id='Test@1'></a>

If you have a better idea...

@YannDub
Copy link
Contributor

YannDub commented Apr 8, 2016

I managed the duplicated anchors with :

  • Pillar-Model-YannDubois.252
  • Pillar-Tests-Model-YannDubois.186

I use my previous post but I extend the idea to checking anchors before transformation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants