Today's release again contains a lot of bug fixes and smaller improvements. There are, as always, some that deserve a little bit of spotlight:
Removed the annoying "Replace file in editor?" message
As many of you have already noticed (and as an issue actually reported a few days ago), Zettlr always had an annoying problem. Every time when you were editing a file that was stored via a cloud service, such as Dropbox, Nextcloud, or GoogleDrive, it could occasionally happen that Zettlr permanently asked you whether or not you want to replace the remotely-modified file. This message was irrational as you were the only one editing the file, and it broke your workflow every time. The reason for this message is that somehow the detection mechanism of cloud services seem to trigger another "change"-event inside Zettlr, which is then not ignored but passed on to the mechanism that prompted you to replace the file. Now, Zettlr will first determine whether or not the file has really changed since it last checked, and only if that is true, Zettlr will bother you with the prompt.
Syntax highlighting in fenced code blocks
Somehow, Zettlr is becoming more and more popular among coders, which is really nice! As my primary goal is to create a Markdown editor for researchers in the arts and humanities, I didn't initially implement code highlighting, because most of us never really need fenced code blocks to explain some code. But now after the issue has been raised, I decided to activate this functionality of Zettlr. Currently, a variety of popular languages is highlighted, but more can be implemented as well.
Do you want code highlighting enabled for additional languages? No problem, simply head over to the list of modes that CodeMirror supports and tell me. Enabling them is a matter of seconds.
As always, there are a lot of additional fixes and improvements, see the changelog for all of them:
GUI and functionality
- Minor fix to the style of
code-blocks in modals.
- Fixed a bug that prevented you from immediately re-selecting the previous file by simply clicking it again, after you opened an external markdown file in Zettlr, which then was selected automatically.
- Fixed an error thrown if a root file was removed remotely.
- Fixed Zettlr always asking to replace a file although it hasn't been modified remotely.
- Fixed a missing translation for changed files.
- Fixed the threshold for being close to surpassing average from 50 words below average to the half of average. 50 words were definitely too narrow for anyone to really see the intermediary message.
- Fixed some design rules.
- Reallowed arbitrary text selection inside the editor (mainly necessary for macOS's quick lookup functionality).
- Added styling for horizontal rulers (
* * *) and escaped characters (e.g.
- Fixes to the new tooltips. Now all tags receive the nicer tooltips on mouse over.
- Replaced the old footnote tooltip bubble, which did not look nice, with the much better
- Added HTML syntax highlighting.
- Fixed an error on the export of Markdown files with code blocks.
- C (c)
- C# (csharp)
- C++ (cpp)
- CSS (css)
- Java (java)
- LESS (less)
- Objective C (objectivec)
- PHP (php)
- Python (python)
- R (r)
- Ruby (ruby)
- SQL (sql)
- Swift (swift)
- YAML (yaml)
Under the hood
- Added an additional check to definitely determine if chokidar has choked or the file has indeed been modified remotely.
- Lots of documentation has been added to the source code.
- Moved the
tippy()function from the
ZettlrRendererto the correct classes (
- Changes to the link detection regex in
- Changes to the
export.texLaTeX export template. It now provides the
Shaded-environment Pandoc requires on exporting files containing fenced code blocks.
- Added some amount of
- Added a multiplex mode that can highlight fenced code blocks.
- Changed signature documentation of
setCurrentFilemethod to reflect the actual process (it is being passed a hash, not a file object).
- Changes to the
ZettlrPreview. Now, the array is never completely regenerated, but resized according to the actual
_data-array. The changes have affected the functionality of the functions
refresh()in this class.
- Added a
Zettlrfor root files wanting to delete themselves.