atom / language-clojure

Clojure package for Atom
Other
49 stars 48 forks source link

Fixed #45: Changed regular expression to match a comment to ignore semicolons that are escaped characters. #46

Closed jasongilman closed 7 years ago

jasongilman commented 8 years ago

I changed the regular expression to the following

(?:(?<=[^\\])(;).*$\\n?)|(?:^(;).*$\\n?)

It's doing a look behind to see if the previous character isn't a \ or it's accepting semicolons that are at the beginning of the line.

This shows the difference after the patch.

sample_clj_ __users_jason__atom_packages_language-clojure