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

[FR]: Only add flair to code; don't flair in comments #26

Open
francisbarton opened this issue Oct 3, 2020 · 0 comments
Open

[FR]: Only add flair to code; don't flair in comments #26

francisbarton opened this issue Oct 3, 2020 · 0 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@francisbarton
Copy link

francisbarton commented Oct 3, 2020

In RMarkdown, flair by default decorates the pattern everywhere it is found within the chunk, including in inline comments.
I'm wondering if this is intended behaviour, or if there could be an easy option to not decorate within comments.

I thought it could be done with a regex, but the only way I could think of was to start a regex with (?<!#.*) which of course doesn't work because a look-behind pattern match needs a bounded maximum length.

So then I was wondering if there was a way of filtering flair out at the level of CSS classes (ie .hljs-comment).

This is a seriously minor feature request but I thought I might as well suggest it in case you think it's a nice thing to add 🙏🏼

@francisbarton francisbarton changed the title FR: only add flair to code; don't flair in comments [FR]: Only add flair to code; don't flair in comments Oct 3, 2020
@kbodwin kbodwin self-assigned this Jan 27, 2021
@kbodwin kbodwin added bug Something isn't working enhancement New feature or request labels Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants