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

Support include of code snippets in a document #37

Closed
donmendelson opened this issue Nov 18, 2020 · 2 comments
Closed

Support include of code snippets in a document #37

donmendelson opened this issue Nov 18, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@donmendelson
Copy link
Member

Some technical specification documents include snippets of code examples or XML elements and the like. Those snippets should remain in source files that can be validated by a language interpreter. Also, source code may be subject to improvements, changes, or corrections over time, but if they are included into a markdown file by copy and paste, they become frozen. Therefore, it would be better to provide a syntax to include snippets dynamically when a Tablature file is processed.

Typically code snippets are bound by markdown fenced code blocks using "```". Rather than literally copying the code into the fenced block, the block would contain syntax to tell a Tablature processor to include a file or section of a file. The source file would need to be accessible at processing time.

@donmendelson donmendelson added the enhancement New feature or request label Nov 18, 2020
@donmendelson
Copy link
Member Author

The markdown parser should recognize fenced code blocks as a leaf block type, including info string.
See https://github.github.com/gfm/#fenced-code-blocks

@donmendelson
Copy link
Member Author

This should be a generic feature of module md-grammar, which is now in its own repository.

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

No branches or pull requests

1 participant