Use current highlighter for a new document version.
StyXman opened this issue · 3 comments
Every time a document is modified and saved, the text type combo stays at 'auto' and reverts to plain text when the new document is loaded.
Steps to reproduce:
- goto linkode.org
- paste some Python code and, optionally, force the text type combo to Python.
- edit the new version and save, without touching the text type combo.
- the text is treated as plain text, w/o highlighting.
When you leave 'auto' the text_type is being saved as 'auto'. But when you force it, it's being saved as the chose language but set 'auto' in the combo. Then, when you update, it use the 'auto' and detects the 'plain text'. It's a front-end bug. I will check it
Thanks
The idea is that if you leave it in "auto" when creating, it should guess the text type, and from that moment on, it should never be in "auto" anymore, but with the guessed type
This would also avoid the glitch of having the text for part of a second without highlighting, and then suddenly highlighted, when you go and see a big linkode (because it brings the text from the server, in "auto", takes time to guess the type, and then it's highlighted).
Fixed, thanks!