Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] False detection of shebang #6

Open
sky-joker opened this issue Mar 24, 2018 · 2 comments
Open

[Bug] False detection of shebang #6

sky-joker opened this issue Mar 24, 2018 · 2 comments

Comments

@sky-joker
Copy link

Hi, @weituotian.

Thank you very good plugin.

I noticed.
if there is shebang in markdown malfunction occurs.

for example

err

Fixed the malfunction by correcting the source as follows.

--- before/example.py   2018-03-24 18:36:33.000000000 +0900
+++ after/example.py    2018-03-24 18:36:27.000000000 +0900
@@ -70,7 +70,7 @@
     def get_toc(self, begin, edit):
 
         # Search headings in docment
-        pattern_hash = "^#+?[^#]"
+        pattern_hash = "^#+?[^!#]"
 
         headings = self.view.find_all(pattern_hash)

thansk.

@Kristinita
Copy link

+1. It would be nice, if md_numbered_headers will ignore # symbols in all GitHub Flavored Markdown code blocks for any language.

Thanks.

@weituotian
Copy link
Owner

@sky-joker @Kristinita
Great! this issue and the advice are excellent!
i am attempted to find a way to do that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants