Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support custom elements #14

Open
YerkoPalma opened this issue Apr 10, 2019 · 0 comments
Open

Support custom elements #14

YerkoPalma opened this issue Apr 10, 2019 · 0 comments

Comments

@YerkoPalma
Copy link

This would be similar to what MDX does but for custom elements, and it's pretty simple.
The idea would be to modify only the Lexer class, and reuse the Parser and Rendere for html. I've already made it for a personal component, but I had to copy and paste the whole lex function.
Api would be something like

const md = require('md')

const html = md(`## hello world

<custom-button>Fancy button!</custom-button>

- [ ] todo
- [x] done
`, { customElements: ['custom-button'] })

If you agree I could send a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant