Skip to content
Commit 6033df86 authored by Megan Conkle's avatar Megan Conkle
Browse files

Syntax highlighting and live spell check performance improvements

Ensure on opening a document that the Markdown AST is not
being rebuilt for each block on a call to setPlainText()
in QPlainTextEdit.  Also set a default font for the
editor via style sheet rather than applying a default format
for each text block in the syntax highlighter. This ensures
that the live spell check does not have to be called for the
entire document after it is opened.

Ensure on spell check rehighlight that it doesn't do a second
rehighlight when the user types something (for example, after
having toggled live spell check or another spell check setting).

Finally, spread out HTML preview updates based on file size and
when the user stops typing to prevent cmark-gfm from being called
twice for each keystroke (for building the AST for the highlighter).
A future improvement would be to prevent rebuilding the AST from
scratch on each keystroke is desirable.
parent 201fd011
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment