obsidian-smarter-md-hotkeys
obsidian-smarter-md-hotkeys copied to clipboard
[Bug]: Special case with special character at the end
Bug Description
In situations with a sentence that starts with a normal alphabet but ends with a special character, the plugin excludes the last character.
eg. Part to be highlighted: World Health Organisation (WHO)
Currently it would work like: ==WOrld Health Organisation (WHO==)
It should rather be ==World Health Organisation (WHO)==
If the part to be highlighted was (WHO)
, then it would make sense to have (==WHO==)
Relevant Screenshot
No response
To Reproduce
No response
Obsidian Version
0.14.6
Which editor are you using?
- [X] New Editor
- [ ] Legacy Editor
In which mode(s) does the problem occur?
- [X] Source (Edit)
- [X] Live Preview
Checklist
- [X] I updated to the latest version of the plugin.
I've noticed this too. I noticed it with Smarter Comments %% where the final %% are put before the final special characters.
E.g. if you have a word in **bold**
, and then want to comment out that word, it becomes %% **bold* %%*
.
This happens if you've highlight the whole word, not just had the cursor inside that word. If you have the cursor in the word, i.e. using the Smarter plugin for that, it becomes **%% bold %%**
.
This is fine if the whole passage you want to change uses that specific formatting. But if the beginning is plain text, and then the special formatting starts somewhere in the middle the issue that @dummifiedme mentioned appears. And then you have trailing asterisks or equals-signs which do appear floating in the text.
Thanks :)
Similar issue with links -- if you select The Foo of "Bar"
and turn it into a hyperlink, you end up with The Foo of "Bar
linked, with the final quote mark outside the link.
Yup, this is still occurring.