highlight.js icon indicating copy to clipboard operation
highlight.js copied to clipboard

Delphi highlighter does nothing

Open vincentparrett opened this issue 1 year ago • 7 comments

Describe the issue

The delphi highlighter appears to be broken, no highlighting occurs.

Which language seems to have the issue?

delphi - not using autohighlight.

Are you using highlight or highlightAuto?

don't know - using https://highlightjs.org/demo to test but I first saw the issue in discourse.

Sample Code to Reproduce

procedure test(const s : string);
var
   x : integer;
begin
   x := 0;
   exit;
end;

Expected behavior

Keywords (procedure, var, begin, end, exit) should be bold and coloured. Built in types string and integer should be bold and coloured (different to keywords).

vincentparrett avatar Mar 13 '24 21:03 vincentparrett

Maybe @allejo can take a look, this definitely works in the developer tool, so the problem isn't with Highlight.js I don't think.

joshgoebel avatar Mar 14 '24 04:03 joshgoebel

Hello, i just added highlight.js to blogger and i have the same issue. I thought i did something wrong so i checked the demo page and here: https://highlightjs.org/examples but there's no highlighting there either.

TikoTako avatar May 15 '24 22:05 TikoTako

What browser are you using?

joshgoebel avatar May 17 '24 22:05 joshgoebel

What browser are you using?

Firefox (pc/phone) and edge (other pc). I tried the code tag (with and without the class language) with c, c#, c++, java, html and delphi. Testing highlight js

TikoTako avatar May 18 '24 13:05 TikoTako

Ah my bad, delphi isnt in highlight.js/highlight.min.js i had to import delphi.min.js But still the demo page is broken for delphi and the examples page dont work at first (for delphi) but it work if i reload the page 🤨

TikoTako avatar May 18 '24 16:05 TikoTako

@allejo

joshgoebel avatar May 19 '24 02:05 joshgoebel

Seems fixed with latest version:

screenshot from https://highlightjs.org/demo of the sample code provided in the issue

KuSh avatar Oct 12 '25 01:10 KuSh