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 a token type like Generic.EmphStrong to allow bold italic styling #2307

Closed
diskdance opened this issue Dec 25, 2022 · 3 comments · Fixed by #2444
Closed

Add a token type like Generic.EmphStrong to allow bold italic styling #2307

diskdance opened this issue Dec 25, 2022 · 3 comments · Fixed by #2444
Assignees

Comments

@diskdance
Copy link
Contributor

diskdance commented Dec 25, 2022

For markup languages like Markdown, syntaxes like ***bold italic*** create a bold italic styled text. Unfortunately I didn't find a way to achieve this since we only have Generic.Emph and Generic.Strong token type. Given that such syntaxes exist in many markup languages, should we add a token type like Generic.EmphStrong?

@diskdance diskdance changed the title Add a Generic.EmphStrong Add a token type like Generic.EmphStrong to allow bold italic styling Dec 25, 2022
@Anteru
Copy link
Collaborator

Anteru commented Dec 28, 2022

I think this makes sense, but I'm wondering about the potential fallout. Technically all you need to do is to have a new standard type in token.py, and add it to default.py in styles, but I'm afraid this may require touching up all lexers which have definitions for Generic.Strong and Generic.Emph -- I didn't check how many of those are around though.

@afarlie
Copy link

afarlie commented Apr 11, 2023

Aside: No Generic.Underline? I can't think of any languages whose syntax explanations would need that though. Maybe URL's in HTML/XML type markups?

@NovemLinguae
Copy link

I think this makes sense, but I'm wondering about the potential fallout. Technically all you need to do is to have a new standard type in token.py, and add it to default.py in styles, but I'm afraid this may require touching up all lexers which have definitions for Generic.Strong and Generic.Emph -- I didn't check how many of those are around though.

Could those be future patches and not hold up the first patch? Looks like a good opportunity for incremental improvement.

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

Successfully merging a pull request may close this issue.

5 participants