Skip to content

Commit

Permalink
Add a check to the current selection at the end, not just the start.
Browse files Browse the repository at this point in the history
  • Loading branch information
hreikin committed Apr 7, 2022
1 parent 4d9550e commit d2f8e40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tkintermd/tkintermd_frame.py
Expand Up @@ -383,7 +383,7 @@ def check_bold_italic(self, md_syntax, md_ignore, md_special):
# Ignore items in the md_ignore variable and then deal with special
# syntax individually. If string starts with anything in md_ignore do
# nothing and return from the function.
if str(self.cur_selection).startswith(self.md_ignore):
if str(self.cur_selection).startswith(self.md_ignore) or str(self.cur_selection).endswith(self.md_ignore):
return
# If the formatting requires special items which can't go in md_ignore
# because they cause issues with markdown being applied incorrectly.
Expand Down

0 comments on commit d2f8e40

Please sign in to comment.