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

Add emphasize-lines option to jsoninclude #47

Open
jpmckinney opened this issue Feb 28, 2024 · 2 comments
Open

Add emphasize-lines option to jsoninclude #47

jpmckinney opened this issue Feb 28, 2024 · 2 comments

Comments

@jpmckinney
Copy link
Contributor

Similar to the option for literalinclude in Sphinx.

https://github.com/sphinx-doc/sphinx/blob/9a30ca7da1aeffe0c21b81fc7722eb1aed1512da/sphinx/directives/code.py#L450-L456

@duncandewhurst
Copy link

+1 this would certainly be handy, though we would need to take care that the emphasised lines don't get out of sync with the source files. For example, in OCDS 1.2, we've made wholesale changes to JSON examples to reflect changes in the schema, so we'd need to make sure to update any directives that use this option accordingly.

@jpmckinney
Copy link
Contributor Author

We can maybe consider an option that matches lines. Sphinx's literalinclude has start-at/start-after and end-at/end-before to match which lines to display; we can maybe use a similar approach for what lines to emphasize (emphasis-start-at, etc.).

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

No branches or pull requests

2 participants