Brett on 22 Aug, 2017 02:09 PM
Thanks for the report. The short response is that it's a known issue,
but the longer answer is:
Because WebKit can't be spellchecked by default, what Marked has to do
is gather the text, send it through the system spellcheck API, then
parse the results and attempt to match them back up with the text.
Certain circumstances, such as if a hyphen is escaped in any way or
there's an HTML tag in the original that wasn't sent to the
spellchecker, can result in an inability to locate the exact text that
triggered an error. The best stopgap there was simply to show the
paragraph where the error existed, and note what the error was.
Generally it's able to highlight, but there are definitely edge cases.
This one might simply be that the API response from the hyphenate didn't
include the other half of the word, so Marked's regular expression
failed matching "sememster" with "four-sememster" in the original text.
It's a tricky setup (and why I chose to sell the feature as an add-on, I
gave many hours of my life to making it work :) ).