awth13 / org-appear

Toggle visibility of hidden Org mode element parts upon entering and leaving an element
MIT License
369 stars 19 forks source link

Bug when two emphasized words are next to each other #1

Closed SPFabGerman closed 3 years ago

SPFabGerman commented 3 years ago

When I have something like *word1* *word2* or *word1* /word2/ or something similar, only the markers of the first word are toggled.

awth13 commented 3 years ago

This was due to org-emph-re regular expression requiring special characters both before and after an emphasised fragment. Since there is only only space between consecutive words, the second word did not match.

Fixed in this commit by making a custom regular expression that does not require special characters after an emphasised fragment, only before.