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

Fix: highlight active line in language-specified codeblock #289

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ See this project's [releases](/../../../releases).
<!-- ### Security -->
<!-- ### Notes -->

## [Unreleased]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this [Unreleased] heading since it looks like all the below changes are already released

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hiya sorry, this title is of equal level to the version titles below and is empty as I haven't locally developed any changes that are yet to be released. But if for example, I added a new feature X and pushed to github, I'd note it here and then when the new version of the plugin is released, this would automatically get set as the new version title. i.e. Since your changes aren't released as a new version yet, I would put them under 'Unreleased' and when a new version is pushed they would automatically be listed under the latest version. Does that make sense? (Not sure this is the best method since this is the only repo i have in any level of 'production' status but it's worked for me so far so if that's not traditionally what's done, always happy to update).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh gotcha that makes sense! I'd missed the section above where it's mentioned that the changelog is based on Keep a Changelog.

I can think of a couple slightly less ambiguous approaches to this (and e.g. Common Changelog avoids the Unreleased section entirely for a couple reasons), but since this is already following Keep a Changelog, it's probably better to keep it as-is than to diverge from that documented format.

Reverted back!

## [1.1.8] - 2024-10-14

### Fixed

- Codeblock active line highlight when language is specified

## [1.1.7] - 2024-02-23

Expand Down
5 changes: 2 additions & 3 deletions main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/css/codeblocks.css
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ pre.code-styler-pre [class^='code-styler-line-highlighted'] > .code-styler-line-
/*! Complicated */
.code-styler-active-line-highlight .markdown-source-view .HyperMD-codeblock.cm-active,
.code-styler-active-line-highlight-codeblock .markdown-source-view .HyperMD-codeblock.cm-active {
background: linear-gradient(to right, var(--code-styler-active-codeblock-line-colour), var(--gradient-highlights-colour-stop), var(--code-styler-codeblock-background-colour)) !important;
--gradient-background-colour: var(--code-styler-active-codeblock-line-colour) !important;
}

/** Line numbers */
Expand Down
3 changes: 1 addition & 2 deletions styles.css

Large diffs are not rendered by default.