Skip to content

Commit 4df15bd

Browse files
committed
Fix whitespace display, bump patch version number
In a (more or less) recent commit, we changed the way we're building the nodes for adding the colours. This introduced a bug for displaying white spaces, because we didn't reflect the changes when passing the root node to process to the relevant function. This went undetected for a while because I didn't immediately publish a new release with the buggy commit. Let's fix it now, and cut a patch release with the bug fix. Fixes: 2c2be93 ("Use hljs's cssSelector to colour blocks, skip links")
1 parent cb83590 commit 4df15bd

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
}
88
},
99
"name": "Colored Diffs",
10-
"version": "2.3.0",
10+
"version": "2.3.1",
1111
"description": "Color diffs in messages formatted by Git or other version control systems",
1212
"author": "Vadim Atlygin",
1313
"homepage_url": "https://github.com/Qeole/colorediffs",

scripts/coloring.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const coloring = {
3838
/* Replace spaces and tabs if required */
3939
if (options.spaces) {
4040
for (const pre of preNodes) {
41-
transformations.replaceSpaces(pre.firstChild, options.tabsize);
41+
transformations.replaceSpaces(pre, options.tabsize);
4242
}
4343
} else if (document.getElementsByClassName("cd-s").length) {
4444
transformations.restoreSpaces();

scripts/transformations.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const transformations = {
9191
transformations.restoreSpaces();
9292
} else {
9393
for (const pre of document.querySelectorAll("body > div > pre")) {
94-
transformations.replaceSpaces(pre.firstChild, options.tabsize);
94+
transformations.replaceSpaces(pre, options.tabsize);
9595
}
9696
}
9797
},

0 commit comments

Comments
 (0)