Spell check error when a period follows a mixed-case custom word with a capital letter in the last position

Steps to reproduce

  1. Adding to dictionary
  • In sandbox, type “TeX.”
  • right-click and add to custom dictionary

The custom dictionary will now contain TeX. instead of TeX.

  1. Not matching dictionary term
  • In sandbox, add TeX to the custom dictionary.
  • Type “TeX.”
  • Compare with TeX[,!?">_]

Spellcheck will show only the version with . as misspelled, but will operate as expected for ,, !, ?, ", >, and _.

Additional information

It has to do with the X in the last position because the following words work as expected:

  • “dunder”
  • “Dataview”
  • “TeXtual”
  • “TeM”

I suspect that JS is seeing . as a separator rather than punctuation for a subset of .+[A-Z]\., and it may be because of common code variables and/or the fuzzy proximity to other words in the dictionary. For example, eX. and eZ. cause the issue while eM. and eI. do not.

Environment

Note: the below is from Obsidian, but it is misidentifying my OS – just an artifact because I’m currently on Win11 Home v 23H2 build 22631.4169.

SYSTEM INFO:
Obsidian version: v1.6.7
Installer version: v1.4.13
Operating system: Windows 10 Home 10.0.22631
Login status: logged in
Catalyst license: none
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on