Giter Club home page Giter Club logo

Comments (4)

ajatprabha avatar ajatprabha commented on July 22, 2024

I verified locally that correcting the syntax does result in a successful build.
Is there a way to change this behaviour behind a cli flag maybe?

from gomarkdoc.

princjef avatar princjef commented on July 22, 2024

Hey @ajatprabha, thanks for looking into this. The [](<>) syntax was pulled from the GitHub Flavored Markdown spec and does work correctly when used within GitHub. I'm not familiar with Docusaurus - does it differ from GFM at all or is it designed to support identical syntax? If it's the former then I'd be open to including an additional formatter that is specific to the format that Docusaurus expects.

Lacking the ability to do that, a CLI flag seems like a possible option. Removing the <> would likely cause little impact to people using the tool today, but there are some edge cases for links that aren't possible without the <>

from gomarkdoc.

ajatprabha avatar ajatprabha commented on July 22, 2024

Docusaurus uses MDX which according to docs is a superset of standard Markdown syntax supporting JSX as well.

Not sure how much effort it will be to add a new flavour for this.

Ref: https://docusaurus.io/docs/markdown-features

from gomarkdoc.

princjef avatar princjef commented on July 22, 2024

Adding new format types isn't too bad (most code has a shared core and tests are generated from snapshots anyway). It looks like the specific problem with MDX here is not actually the base markdown syntax (CommonMark is the base spec they reference and it supports <> around link destinations), but rather their note about needing to escape < and > to avoid conflicts with the JSX syntax.

Are there any other features of the github format that don't make sense for your use case? Things like the repository code links and accordion are pretty specific to how GFM wants to render things and don't carry over to the plain format for instance.

I've considered adding a CommonMark format in the past and have only held off because nobody has asked for it. I'd be alright with throwing an MDX format in with a couple tweaks while I'm at it if that can make the integration more seamless.

from gomarkdoc.

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.