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

MMark -> Pandoc AST #166

Merged
merged 46 commits into from
May 13, 2020
Merged

MMark -> Pandoc AST #166

merged 46 commits into from
May 13, 2020

Conversation

srid
Copy link
Owner

@srid srid commented May 9, 2020

See how feasible it is to completely switch over from MMark to Pandoc AST.

  • Markdown to be parsed using commonmark-hs (default);
    • in future potentially we could support multiple source formats (including Pandoc's native markdown parser, org-mode, reST, etc.)
  • Use HsYaml to manually parse the Yaml blocks (unless Implement yaml_metadata_block extension jgm/commonmark-hs#17 gets implemented by someone)
    • Make sure it works with GHCJS
  • Profile and identify performance bottlenecks
  • Make fontawesome icons work (Pandoc AST cannot represent <i> with custom classes).
  • Modify the rest of neuron to switch over to the new parser
  • Use necessary commonmark extensions (eg: math)
  • Port/add unit tests
  • Documentation updates

Finally,

If successful, this will resolve #137.

srid added 2 commits May 8, 2020 18:40
- commonmark requires a later unreleased pandoc
- so we advance rib, dropping its pandoc-include-code (which doesn't
  work with new pandoc-types)
- also update nixpkgs

srid/rib@d7d98f7
As well as add a function to extract links.

Use a very basic extension to detect auto-links. Disable the raw html
parser which gets in the way.
@srid srid added this to the 0.6 milestone May 9, 2020
@srid srid self-assigned this May 9, 2020
@srid srid marked this pull request as draft May 9, 2020 02:22
@srid
Copy link
Owner Author

srid commented May 10, 2020

HsYAML is rather slow. haskell-hvr/HsYAML#40

image

image

@srid srid changed the title WIP: MMark -> Pandoc AST MMark -> Pandoc AST May 13, 2020
@srid srid marked this pull request as ready for review May 13, 2020 14:31
@srid srid merged commit f75aa3e into master May 13, 2020
@srid srid deleted the pandoc-ast branch May 13, 2020 14:42
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

Successfully merging this pull request may close these issues.

Switch to Pandoc (commonmark-hs)
1 participant