Kungsgeten / yankpad

Paste snippets from an org-mode file
MIT License
216 stars 18 forks source link

Unexpected yankpad-expand behavior #46

Closed ndw closed 5 years ago

ndw commented 5 years ago

Consider this fragment of my yankpad file:

** Simple string replacements                                   :snippetlist:

   - wtf :: ¯\_(ツ)_/¯

The yankpad-expand replacement for wtf is "¯\". Oddly, if I replace the first underscore with a "." or other character, it works fine. So for some reason backslash followed by underscore stops the expansion. Putting in an extra backslash doesn't help.

Kungsgeten commented 5 years ago

Thanks for reporting this! The problem had to do with the org-element API and how I used it. It seems to treat text followed by a backslash in some special way. I've commited a patch which seems to fix the issue.

ndw commented 5 years ago

Yep. Thanks!