Merged
Conversation
yboulkaid
reviewed
Nov 6, 2022
lib/jekyll/tags/highlight.rb
Outdated
| "class=\"language-#{@lang.to_s.tr("+", "-")}\"", | ||
| "data-lang=\"#{@lang}\"", | ||
| %(class="language-#{@lang.to_s.tr("+", "-")}"), | ||
| %(data-lang="#{@lang}"), |
Contributor
There was a problem hiding this comment.
One small (non-blocking) suggestion: we could put everything in one line to avoid having to go through an array and join its contents:
code_attributes = %(class="language-#{@lang.to_s.tr("+", "-")}" data-lang="#{@lang}")
Member
Author
There was a problem hiding this comment.
Theoretically, we could have this in one line. But I think that would increase the line-length greater than 100 chars (as enforced by our rubocop config. Regardless, I cannot test this myself at the moment).
Contributor
There was a problem hiding this comment.
Just tested it and it fits under the 100 char length limit :)
yboulkaid
approved these changes
Nov 6, 2022
Contributor
yboulkaid
left a comment
There was a problem hiding this comment.
All cosmetic changes that make the code better 👍
`@lang` is assigned a string during initialization
parkr
approved these changes
Nov 7, 2022
Member
Author
|
@jekyllbot: merge +dev |
jekyllbot
added a commit
that referenced
this pull request
Nov 7, 2022
github-actions bot
pushed a commit
that referenced
this pull request
Nov 7, 2022
Ashwin Maroli: Cleanup highlight tag (#9177) Merge pull request 9177
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Some internal changes to improve
Jekyll::Tags::HighlightBlock