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

Experimental support for Markdown #1268

Merged
merged 3 commits into from Aug 25, 2022

Conversation

Gedochao
Copy link
Contributor

@Gedochao Gedochao commented Aug 22, 2022

Fixes #1231
This is a reworked version of #1216, kudos to @BlackAnubis7 for the initial PoC

Issues to be addressed separately

  • properly supporting using directives
    • currently only supported in the first scala raw and scala test snippets in a given .md file, given to the way they are being processed
    • not supported at all in plain scala snippets.
    • fixing those will require a further refactor of the code wrapping & preprocessing logic
    • separate scopes will probably have to be supported as separate Scala files after all
    • I initially thought we could maybe even limit the number of generated sources to just 1 (after Enable defining and running tests inside same Scala file #1093 is addressed), but this will likely prevent that
  • currently there's only support for on-disk sources (piped and remote Markdown inputs will be addressed separately)
  • another refactor will be necessary to get rid of the empty lines hack in the generated code (currently, a lot of empty lines are added in the Scala sources generated from Markdown to keep the line numbers consistent)
  • we currently only support scala snippets, but supporting java shouldn't be hard to add

@Gedochao Gedochao added the enhancement New feature or request label Aug 22, 2022
@Gedochao Gedochao marked this pull request as ready for review August 22, 2022 08:44
@Gedochao Gedochao force-pushed the markdown-support-initial branch 2 times, most recently from 8f3a37f to 5fcc047 Compare August 24, 2022 12:11
@Gedochao Gedochao requested a review from lwronski August 24, 2022 12:14
 - Hide markdown support behind a feature flag (`--enable-markdown`)
 - still process explicitly passed Markdown files
 - remove some PoC simplifications and workarounds
 - misc refactors
@Gedochao Gedochao merged commit 929dfc3 into VirtusLab:main Aug 25, 2022
@Gedochao Gedochao deleted the markdown-support-initial branch August 25, 2022 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Initial Markdown support
3 participants