Comments (4)
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.
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.
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.
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)
- Pre-commit support HOT 1
- String manipulation functions in template
- [Bug] Check mode always returns with zero exit code when embed mode is also enabled HOT 1
- Is there a way to omit certain functions? HOT 2
- Pandoc Markdown Support
- Generated files have an execution permissions on Linux
- Multiple newlines are generated during templates processing
- Bug in generating markdown files with characters *(){}[]- HOT 1
- Ability to choose codeblock language HOT 2
- Generate wrong index for go 1.18 generic code HOT 6
- support new godoc spec enforced by gofmt HOT 3
- Links in comments aren't generated correctly HOT 1
- git branch issue when running in ci environment HOT 2
- new headings syntax in go 1.19 HOT 1
- Is there a way to generate docs for all packages in a project HOT 1
- Ignoring appending into generated docs when using -e flag HOT 2
- add support for Template functions HOT 3
- Ignore vendor folder HOT 4
- Links appear broken in README files HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gomarkdoc.