Skip to content

Commit

Permalink
Merge pull request #462 from ehuss/fix-replace-link
Browse files Browse the repository at this point in the history
Fix replacement link on Sublime Text 4.
  • Loading branch information
ehuss authored May 21, 2021
2 parents 7a2f990 + 3527a7c commit 1849b87
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions rust/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,13 @@ def _render_suggested_replacement(self):
html_suggestion = html_suggestion\
.replace(' ', ' ')\
.replace('\n', '<br>\n')
return replacement_template % (
urllib.parse.urlencode({
'id': self.id,
'replacement': self.suggested_replacement,
}),
html_suggestion,
)
url_param = urllib.parse.urlencode({
'id': self.id,
'replacement': self.suggested_replacement,
})
if int(sublime.version()) > 4000:
url_param = url_param.replace('&', '&amp;')
return replacement_template % (url_param, html_suggestion)

def suggestion_count(self):
"""Number of suggestions in this message.
Expand Down

0 comments on commit 1849b87

Please sign in to comment.