Skip to content

Commit

Permalink
Merge pull request #2 from flexo333/SublimeText-Markdown#572
Browse files Browse the repository at this point in the history
Add trailing space to title check
  • Loading branch information
flexo333 authored Feb 20, 2021
2 parents 7d456f8 + 8ceb34c commit 8255059
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion decide_title.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def on_modified_async(self, view):
syntax = view.settings().get('syntax')
if syntax and 'Markdown' in syntax:
text = view.substr(sublime.Region(0, view.size()))
it = re.finditer(r'^(#{1,6}(?!#))|^(-{3,}|={3,})', text, re.M)
it = re.finditer(r'^(#{1,6}(?!#)(?=\s))|^(-{3,}|={3,})', text, re.M)
title = ''
title_begin = None
for m in it:
Expand Down

0 comments on commit 8255059

Please sign in to comment.