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

Remove italics from preprocessor style rules #1264

Merged
merged 1 commit into from
Jul 17, 2019

Conversation

pyrmont
Copy link
Contributor

@pyrmont pyrmont commented Jul 16, 2019

Three of the default themes that come with Rouge italicise text tokenised with the Comment::Preproc token. This is consistent with the styling applied to other tokens within the Comment group but is not appropriate for a token that is typically used with code that can include characters like / (the Comment::Preproc token is the recommended token for PHP and ERB, for example).

This commit removes the italics attribute from the themes Magritte, Thankful Eyes and Tulip. The styles are otherwise left unchanged. It is expected that this change will precede a separate PR that will address #1237.

Three of the default themes that come with Rouge italicise text
tokenised with the `Comment::Preproc` token. This is consistent with the
styling applied to other tokens within the `Comment` group but is not
appropriate for a token that is typically used with code that can
include characters like `/` (the `Comment::Preproc` token is the
recommended token for PHP and ERB, for example).

This commit removes the italics attribute from the themes Magritte,
Thankful Eyes and Tulip. The styles are otherwise left unchanged.
@pyrmont pyrmont added the needs-review The PR needs to be reviewed label Jul 16, 2019
@pyrmont pyrmont mentioned this pull request Jul 16, 2019
@ashmaroli
Copy link
Contributor

with code that can include characters like /

@pyrmont I think you meant to reference the pipe char (|) that may then appear as / when italicized.

Also, is there a community standard where the styles for each token in a given theme are defined or are they arbitrarily decided when authoring the theme?

@pyrmont
Copy link
Contributor Author

pyrmont commented Jul 16, 2019

@ashmaroli Thank you, yes I meant characters like | and \.

As for the token styles, I believe they're arbitrarily decided by the author. In that sense, the decision as to whether to use italics or not is a stylistic one for which it could be argued there is no 'wrong' answer. I find that argument persuasive generally but, at least in the case of the Thankful Eyes theme, I think having styles that don't generate ambiguity should be preferred.

@pyrmont pyrmont merged commit 1d86c48 into rouge-ruby:master Jul 17, 2019
@pyrmont pyrmont removed the needs-review The PR needs to be reviewed label Jul 17, 2019
@pyrmont pyrmont deleted the bugfix.preproc-styles branch January 8, 2020 20:07
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 this pull request may close these issues.

3 participants