Coder Social home page Coder Social logo

Comments (3)

mle86 avatar mle86 commented on June 15, 2024

Yes, GitHub and most other Markdown renderers output sane anchors (such as “See Also: Chapter 5” → #see-also-chapter-5,
but I've seen renderers with a different output style (#seealsochapter5).

Since the script now supports links to anchors (.\" LINK-TO SECTION TITLE), the script needs to know the exact anchor name -- and the easiest way to accomplish that is to output them itself.

That may of course result in duplicate anchors but since they're both in the same position, that shouldn't be a problem.

from man-to-md.

mle86 avatar mle86 commented on June 15, 2024

(But I've noticed a related problem: sometimes different sections have the same name, such as “Examples” sub-sections. Those should of course get different anchor names. GitHub's renderer uses #examples-1 anchors in these cases. But implementing something similar in my script would be rather complicated right now as there's no way to reference a section other than by its exact title.)

from man-to-md.

vapier avatar vapier commented on June 15, 2024

the lack of standardization in automatic anchor link generation is a great point as a generalized tool. maybe for people who only ever target one renderer could have an option to skip the automatic generation ? that way you could put a comment in noting the lack of standardization which is why the are created in the first place.

from man-to-md.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.