GithubHelp home page GithubHelp logo

Comments (2)

UziTech avatar UziTech commented on June 20, 2024

Thank you for loving marked 🥰

By default marked tries to follow GFM and CommonMark spec.

Bug 1

As you can see by the following example GitHub uses a single list for task and non-task items:

  • item1
  • item2

Changing this would mean markdown in marked wouldn't render like GitHub.

Bug 2

This follows CommonMark: demo

You can get this to work if you set the breaks option to true. That option will add a <br> for every newline like GitHub comments.

styling

Marked renders html without styling or classes. It is up to the user to provide styling and ideally markdown should render semantic html simple enough to style without classes.

extensions

We have tried to make extending marked as easy as possible. Extensions are a way for users to opt-in to certain features instead of requiring everyone to download code they don't need/want. If you create an extension to add classes to task lists or separate task lists from non-task lists feel free to add it to the known extensions in our docs.

Thanks again!

from marked.

jiaopengzi avatar jiaopengzi commented on June 20, 2024

Thank you very much for your prompt response. Indeed, using semantic tags is better. I now understand your original intention, and I have gained a lot of valuable insights. I've also learned about creating custom renderers to implement CSS class names.
I sincerely thank you once again.

from marked.

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.