[Bug] [B40] Spelling mistakes when ` (backtick) followed by punctuation

When a word is inside backticks (`) and followed by punctuation, Scrivener incorrectly labels that word as wrong.

For example:


(Version: Beta (845700) 64-bit)

[size=85](I searched through the forum and it seems that this behaviour isn’t documented yet. My apologies if it’s already known behaviour.)[/size]

In the examples given the punctuation should be inside the quotation marks regardless of UK or US grammar if I remember my international grammar correctly. I’m guessing that’s why it’s flagged as an error though it’s Grammar, not spelling.

That might be true—although I’m actually skeptical in this case, since single quotation marks that denote words as words (according to UK style used in the US anyway) are normally treated separately from punctuation. However, backticks are not quotation marks. As far as I know, they shouldn’t be considered as part of any spelling rule with respect to punctuation.

True. Regular Scrivener (1.9.7) doesn’t consider them spelling mistakes:


Neither does Microsoft Word:


Nor does FireFox’s spelling in the browser:



But the issue is not what the grammar rules are for backticks (which I couldn’t find online, by the way). Scrivener 3 already choose to allow words in backticks, because hello is considered proper:

The problem is that Scrivener 3 considers hello a valid word (which it is), but hello. a spelling mistake. That’s of course incorrect, because if the word is valid, then a punctuation character after that word is also valid spelling.

If I remember correctly, in both the UK and US following punctuation goes inside the closing quote mark, so these may be getting flagged by the spelling engine because you show a series of backtick-quote words followed immediately by a punctuation mark. Aspell may be flagging these because the following punctuation should be inside the quotes (be they backticks, single quotes, or double quotes) according to the grammar rules of the language you are using. So the problem is why does Aspell consider backticks quotes?

I’m just curious, but why does anyone want to enclose a word in backticks in the first place?

My $.02 would be:
(A) There are occasions when punctuation, especially a question mark, properly follows a close-quote, e.g.,

In the UK, I think, it is in fact much more common to use single quotation marks and have closing punctuation outside the close-quote:

And in absolutely any case, a semicolon must come after the close-quote.

(B) In any case, a spellchecker should check spelling, and not worry its already worried mind about the propriety of the surrounding punctuation. So yeah, IMHO this looks like a bug.

You’d be interested if you were using Markdown for documentation.

Ah, thanks for the clarification: I’ve never used it, so had no idea.

I see your point and I thought that was also the case. But if I test then it seems that backticks are treated differently than single and double quotes (with English (en-gb) spelling):


I agree. And for what it’s worth, all your example sentences are valid according to Scrivener:


So Scrivener seems smart enough to handle the different ways to use single and double quotes. It’s just that when backticks are involved, it gets confused. :slight_smile:

Like Narrsd inferred properly, I write words in backticks for the Markdown format. :slight_smile:

(Thanks everyone for thinking along by the way, I appreciate it! :slight_smile: )

All I can suggest is that somehow the closing (but not the opening?) backtick is being interpreted as an alphabetical character rather than a punctuation mark when it is followed by a (another) punctuation mark (but not when followed by a space!). I think spellcheckers distinguish between alpha (or alphanumeric) characters and “separators,” which include spaces and punctuation. So the problem may be partly differentiating a space from other separators, and partly the erroneous considering of a backtick as an alpha character rather than a separator. But I’m well out beyond the end of my actual knowledge.

This is odd. But are the Scriv devs actually programming the spellchecker? It’s licensed from Aspell, correct? In which case about all they can do is report this to its actual developers.

Aspell is a GNU open source project, if I remember correctly – so in theory, they can figure out what the cause of the issue is, patch the version they’re using, and send the patch upstream for inclusion in the main release.

Now there’s a post-release, post-fixing-major-uncaught-bugs task. Though I suppose if I were using Markdown I’d feel differently.

That actually doesn’t seem needed because Aspell already supports Markdown since July 2019 already.

The feature that Aspell added made it possible to (italic added):