ghi-electronics / due-console

A console interface to work with DUE
https://console.duelink.com/
0 stars 0 forks source link

Code highlighting #51

Closed gus-ghielec closed 1 year ago

gus-ghielec commented 1 year ago

We use # for comments in DUE. We need to select python as a language so comments are highlighted properly.

However, if there is a way to completely customize the highlighter, we need instructions so we can tweak it for DUE.

dudedigital commented 1 year ago

@gus-ghielec I spent awhile looking into this and most code highlighter rule files are tedious to write/understand. You can look at the following links for yourself to see the complexity for CodeMirror and the Ace Editor (to name a few). Some even require you to run it through special compilers.

The answer to this is a very simple custom editor that only highlights your keywords. I got something working with good potential, just needs a bit more polish.

gus-ghielec commented 1 year ago

Selecting python is good enough for now