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

Data pages: switch to a new markdown parser and renderer #2758

Closed
12 of 17 tasks
Tracked by #2733
danyx23 opened this issue Oct 12, 2023 · 0 comments
Closed
12 of 17 tasks
Tracked by #2733

Data pages: switch to a new markdown parser and renderer #2758

danyx23 opened this issue Oct 12, 2023 · 0 comments

Comments

@danyx23
Copy link
Contributor

danyx23 commented Oct 12, 2023

Our current markdown parsing and rendering logic was handrolled because we had very limited syntax needs for chart subtitles and footnotes specifically and wanted to support custom DoD syntax.

Our needs have changed now and with authoring many more metadatafields in the ETL as markdown our desire to support more markdown features has grown. We could extend our current custom parser but we heard about some advanced requests like parsing/rendering formulas that we wouldn't want to handroll.

Requirements

  • Separate parsing and rendering steps (since we will need to render chart subtitles ourselves in svg text with support for measuring svg text width)
  • Ability to process the markdown AST (so that we can rewrite items that make sense in a certain context like headings)
  • Should come with a capable renderer that integrates with react 16
  • Support for syntax extensions (e.g. superscript/subscript, ideally also advanced stuff like formulas)

Implementation plan

Must have

Nice to have

  • Superscript/subscript
  • <br> tags
  • Tables
  • Formulas
  • Consider adding a markdown component to gdocs authoring (especially useful if we were to add tables and/or formulas as we don't have a good solution for those in GDocs either)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant