Skip to content

Commit 33bc260

Browse files
committed
Fix missing buttons with ST 4
After recent update, the Git Blame line no longer shows the buttons in Sublime Text 4, and logs the following error in the console: Parse Error: _num=24&">[Prev]</a> 2addc0883630 <a href="copy?sha=2addc0883630">[Copy]</a> <a href="show?sha=2addc0883630">[Show]</a> <a class="close" href="close">×</a> </span> </div> </body> code: Unexpected character Let's escape the ampersands to prevent this.
1 parent 4ecda8e commit 33bc260

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/blame.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def run(self, edit, prevving=False, fixed_row_num=None, sha_skip_list=[]):
8383
# Querystrings can contain the same key multiple times. We use that
8484
# functionality to accumulate a list of SHAs to skip over when
8585
# a [Prev] button has been clicked multiple times.
86-
qs_skip_keyvals="&".join(
86+
qs_skip_keyvals="&amp;".join(
8787
[
8888
"skip={}".format(quote_plus(skipee))
8989
for skipee in sha_skip_list

src/templates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<span class="message">
77
<strong>Git Blame</strong> ({user})
88
{date} {time} |
9-
<a href="prev?sha={qs_sha_val}&row_num={qs_row_num_val}&{qs_skip_keyvals}">[Prev]</a>
9+
<a href="prev?sha={qs_sha_val}&amp;row_num={qs_row_num_val}&amp;{qs_skip_keyvals}">[Prev]</a>
1010
{sha}{sha_not_latest_indicator}
1111
<a href="copy?sha={qs_sha_val}">[Copy]</a>
1212
<a href="show?sha={qs_sha_val}">[Show]</a>

0 commit comments

Comments
 (0)