curiouslychase / _goorgeous

[DEPRECATED] A go org syntax parser to html
MIT License
160 stars 28 forks source link

WIP: Lex and parse rewrite #67

Closed curiouslychase closed 5 years ago

curiouslychase commented 7 years ago

The current implementation of goorgeous is based on the RussRoss/blackfriday method of generating HTML byte for byte at the time the input is parsed.

This implementation works well for Markdown, but has created a tremendous amount of technical debt for implementing org mode.

This PR will remove the initial goorgeous implementation and replace it with a lex and parse implementation that will be easier to contribute to, easier to read and provide a more robust ability to do things like use goorgeous for tangling as well.

This is possible because the lexer itself will parse the tokens, send them on a channel. The parser will create an AST from the values on the channel that will give it flexibility to generate HTML and potentially in the future generate other types of files to be in parity with org mode.

The end state will be that all original goorgeous tests will pass, be easier to read/contribute to, along with fixing some of the issues that are currently open (as an example some of the new line issues). There's also the potential added benefit that it will hopefully be a little bit faster since it's using goroutines.