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

Make variables in code blocks italic #15

Closed
kai687 opened this issue May 29, 2020 · 5 comments
Closed

Make variables in code blocks italic #15

kai687 opened this issue May 29, 2020 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@kai687
Copy link
Owner

kai687 commented May 29, 2020

I want to be able to make italicized output of variables in code block. The parsed literal directive should allow that, but I'm not sure yet how to integrate that into a code-block directive.

@kai687 kai687 added the enhancement New feature or request label May 29, 2020
@kai687 kai687 self-assigned this May 29, 2020
@kai687
Copy link
Owner Author

kai687 commented May 29, 2020

If I'm deriving a new directive for this, I want to enable +/- 'diff' highlighting as options. Basically a separate :emphasize-lines: option is all that is needed. This would allow some concise notation for changes users have to make to existing code.

@kai687
Copy link
Owner Author

kai687 commented May 30, 2020

A new directive could also take care/include the copy button in the markup. No additional client side DOM manipulation would be necessary (only the selection/copying).

@kai687 kai687 added the wontfix This will not be worked on label Jun 5, 2020
@kai687
Copy link
Owner Author

kai687 commented Jun 5, 2020

I don't see this happening. It's a fundamental conflict between the pygments syntax highlighting and parsed literal text. I could have imagined doing something like the EmpasizedLiteral() role but as directive, but then I would have to go line by line and search for the parentheses. I don't want to think about it right now.

@kai687 kai687 closed this as completed Jun 5, 2020
@kai687 kai687 reopened this Jun 6, 2020
@kai687
Copy link
Owner Author

kai687 commented Jun 6, 2020

I implemented this as a new directive that is available with the theme.

@kai687 kai687 removed the wontfix This will not be worked on label Jun 6, 2020
@kai687
Copy link
Owner Author

kai687 commented Jun 7, 2020

The directive is implemented in a separate project sphinxawesome-sampdirective. This will get added as a dependency to this theme. The theme provides the style.

@kai687 kai687 closed this as completed Jun 7, 2020
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