-
Notifications
You must be signed in to change notification settings - Fork 49
feature: allow padding for inline code #274
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
Comments
Sure, will get to this soon |
## Details Request: #274 Adds `inline_pad` option to `code` component which is used to add spaces on both sides of inline code blocks. In order to make offset calculations work correctly needed to make some minor adjustments to the logic: - Marks that do not specify an end use the start as the end rather than being ignored when adding offset to context - A node overlaps with a range if its start is <= the end of the range, not strictly <, this is because ends are inclusive for these ranges
Done: 65b263d Can configure it with: require('render-markdown').setup({
code = { inline_pad = 1 },
}) |
I apologize but I can't seem to highlight the padding itself. As with the image above, I am trying to highlight the newly added space but the pads appear the same color as the |
Ah, gotcha, updated the highlight used for the padding to the same one as the inline code body here: c00cc1e |
It works perfectly. Thank you very much! This is slick. |
Is your feature request related to a problem? Please describe.
I am bothered by the lack of space around inline code because I feel that it is harder to read. I think that padding around inline code would be easier to read.
Describe the solution you'd like
I would like the ability to specify padding around inline code such that inline blocks appear spacious without having to add space oneself. For example, this is what inline blocks in render-markdown look like by default:
With a padding feature, we may have something that looks like this by default:
This was created by adding spaces between the backticks and the text.
Describe alternatives you've considered
One may simply add extra spaces to their document. This is fine, but this requires changing the text to achieve an aesthetic.
Additional information
No response
The text was updated successfully, but these errors were encountered: