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

Script that checks DSL examples in documentation are up to date #378

Closed
cdleary opened this issue Apr 7, 2021 · 1 comment
Closed

Script that checks DSL examples in documentation are up to date #378

cdleary opened this issue Apr 7, 2021 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@cdleary
Copy link
Collaborator

cdleary commented Apr 7, 2021

Probably good do this in two steps: introduce language blocks for DSL examples that indicate which ones are "full" and testable (vs snippets), and then make a script that scrapes all the full ones out of the docs and parses/typechecks/tests them.

@cdleary cdleary added documentation Improvements or additions to documentation enhancement New feature or request labels Apr 7, 2021
@cdleary cdleary self-assigned this Apr 7, 2021
@cdleary
Copy link
Collaborator Author

cdleary commented Apr 23, 2021

I spent some time poking around inside Python-Markdown (which mkdocs uses) to see if hooking into existing structured parsing in there would be smarter than just regexp-ing our .md files. The way that the fenced code extension works, it seems to effectively match out of the character stream with a regexp, and it seems to want the fenced code blocks just at the document root level with the default extension (per details https://python-markdown.github.io/extensions/fenced_code_blocks/ ) so probably not so bad to just implement the simple thing ourselves: https://github.com/Python-Markdown/markdown/blob/c0b1dc5d315624799ac1ba380eced9838e7f4bca/markdown/extensions/fenced_code.py#L43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant