When I open a markdown document in two panes view, the editing pane would sometimes display incorrectly: the last paragraph of text is given a partly overlapping “shadow” (see screenshot below as an example). Preview pane is rendered correctly.
This glitch happens to some (personal estimate is 10%), but not all, of my markdown documents. It seems that documents without headings are particularly prone to the glitch.
This glitch is language agnostic: I have documents in either of two languages (Chinese and English), and it happens to both.
This glitch occurs with WYSIWYG editing toggle either ON or OFF.
The display glitch would disappear when I make an edit anywhere (not only the last paragraph) in the document.
Plain Text Font used in screenshot: SF Pro Text Light 14. Using other fonts did not solve this issue for me, either.
In my memory, this glitch has been present for as long as I have been using DT. Both rebooting the device and restarting DT did not work, nor did a fresh system reinstallation this January.
DEVONthink Pro 3.9.6, macOS 14.4.1.
Document used in the screenshot: example.zip (1.1 KB)
Another, perhaps unrelated, markdown editor glitch, when using a Plain Text Font without provision for Chinese characters (e.g. Arial)
When pasting plain text including both Latin and Simplified Chinese characters, the entirety of the pasted text would sometimes, but not always, appear in PingFang SC font (system font for Simplified Chinese). Even though the Latin part of the pasted text is supposed to be displayed in the Plain Text Font designated in app settings.
See how the link in screenshot below is displayed in a different font from other text in editor:
If it’s not related to WYSIWYG, then it’s most likely one of the many (temporary) display glitches of macOS’ text engine. Especially in the last few years I notice these glitches more often than not in TextEdit too after pasting.
2) I’ve found a way to consistently reproduce the “incorrect font” glitch in DT, through the following steps:
Create a new markdown document
Paste this into the document as plain text: 测试 this is some text
Select the Chinese characters 测试 (this step is critical)
Run this simple script: tell application id "DNtp" to set selected text of think window 1 to "测试 this is some text"
And you will see the font difference between the two “this is some text”.
However, if I run set the clipboard to "测试 this is some text" and paste manually at step 4, the paste text will be of correct font (Chinese in PingFang SC, English in PTF).
I’m not aware of an equivalent of DT’s selected text in TextEdit, therefore cannot make the same comparison in TextEdit.
Thanks for the instructions! Internally DEVONthink just replaces the text selection with the provided plain text string, meaning it’s another glitch of the text engine of macOS (especially as this happens both with and without WYSIWYG editing).