4

I was working on an answer to Is there a way to ping a Bluetooth device from Windows?.

And I was wondering why AutoIt syntax highlighting on Stack Exchange sites is so "poor".

I was searching for information, btw. I created a pull request to: https://github.com/highlightjs/highlight.js/blob/master/src/languages/autoit.js

But going to the issue...

First question: Answered here.

Using lang-autoit

Func _BluetoothFindFirstRadio(ByRef $phRadio)

Using lang-default

Func _BluetoothFindFirstRadio(ByRef $phRadio)

Why do func and _BluetoothFindFirstRadio and ByRef use the same color ?

IMHO, here in this case it should use different colors in syntax highlighting, but I do not know how or if this could be improved.

Feature Request Please add support for lang-autoit

Second question:

;~ https://www.autoitscript.com/forum/topic/140162-help-with-dllstruct-and-pointers/?tab=comments#comment-984341

Why is number 140162 colored as a number, and the next part of this line is colored differently, regardless of the fact that everything is in the comment line?

The same problem with comment line is in case of lang-vb like in the following exmaple:

` https://www.autoitscript.com/forum/topic/140162-help-with-dllstruct-and-pointers/?tab=comments#comment-984341

At Formatting Sandbox I put some effort for testing.

16
  • The canonical is What is syntax highlighting and how does it work? (contains the most detailed information). – P.Mort. - forgot Clay Shirky_q Feb 1 at 18:09
  • AutoIt is some dialect of BASIC. Is there a mapping from the AutoIt tag to some close relative, like VB.NET (lang-vbnet or lang-vb)? (A possible workaronnd could be lang-vb.) – P.Mort. - forgot Clay Shirky_q Feb 1 at 18:13
  • 1
    Do you have a reference for lang-autoit (that you used in the Super User question) being a valid identifier? – P.Mort. - forgot Clay Shirky_q Feb 1 at 18:15
  • according to What is syntax highlighting and how does it work? and: Supported Languages AutoIt is supported. AutoIt have similar syntax to VBA and VBS, but there are many differences. – Michał Lipok Feb 1 at 18:30
  • @P.Mort.-forgotClayShirky_q here is current version of lang-autoit used on SE sites. – Michał Lipok Feb 1 at 18:31
  • 3
    @MichałLipok We do not use all languages available in Highlight.js and do not have the AutoIt language loaded into our system at all. lang-autoit simply reverts to default and allows Highlight.js to guess at how to highlight. – animuson Feb 1 at 18:54
  • A minute ago I edit my second question. An example for lang-vb was added. There is also problem with incorrect colors in comment line. – Michał Lipok Feb 1 at 18:55
  • @animuson according to your reqeust question was already edited, – Michał Lipok Feb 1 at 19:00
  • I reedit as I find that I must to specify directly lang-default. Now it looks like lang-autoit automaticaly reverts lang-default as you said. – Michał Lipok Feb 1 at 19:05
  • Could you add support for lang-autoit ? – Michał Lipok Feb 1 at 19:07
  • At Formatting Sandbox I put some effort for testing. – Michał Lipok Feb 1 at 19:27
  • As for Question1 I maked them as answered and at the same time I make a Feature Request – Michał Lipok Feb 4 at 21:13
  • As for Question2: How we can improve Highlighting ? – Michał Lipok Feb 4 at 21:14
  • Now I see How do I report a bug or request a new language? in this What is syntax highlighting and how does it work? Will follow that. – Michał Lipok Feb 4 at 21:30
  • @MichałLipok please do some research before writing such request. What are the (bandwith) costs of that language support and is that reasonable compared to the amount of questions that benefit from it. – Luuklag Feb 4 at 22:10

You must log in to answer this question.

Browse other questions tagged .