GithubHelp home page GithubHelp logo

Comments (4)

fabbra avatar fabbra commented on July 28, 2024 1

perfect. thanks a lot for the fix!

from github-flavored-markdown-to-html.

phseiff avatar phseiff commented on July 28, 2024

@fabbra Hello, and sorry for responding so late (several months, actually). I accidentally unwatched my own repository, and missed several issues in the process. I didn't realize this until right now, though.

My apologies for the delayed response; I will look into the issue (and hopefully fix it) this evening.

Did you find a workaround for yourself? I'm sorry if you had to stop using my tool due to me not fixing this in time.

I suppose there might be a more elegant solution to this?

I think the behavior is probably either caused by GitHub's web API, or by some internal code of the module. In the later case, I just need to change some code, and in the former one, I will parse the HTML and do some changes to the parsed HTML (using sed would probably cause issues in case the string "user-content- is used within a code box, for example.

from github-flavored-markdown-to-html.

phseiff avatar phseiff commented on July 28, 2024

Turns out the behavior to start header ids with user-content- is GitHub-specific behavior (and the offline-option that gh-md-to-html provides actually imitates that behavior on purpose). This behavior is also intended, because it ensures that the resulting HTML file can be embedded into any website, for example using a self-written static site generator, without clashing with anchors used by the rest of the website provided none of them starts with user-content-.

from github-flavored-markdown-to-html.

phseiff avatar phseiff commented on July 28, 2024

I fixed this now by making the tool change all internal links from <a href="#foobar"> to <a href="#user-content-foobar">.
Thanks again for filing this issue! :D

from github-flavored-markdown-to-html.

Related Issues (20)

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.