Syntax highlighting test

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Syntax highlighting test
by on (#127637)
Code:
Testing SyntaxHighlighter:
lda #<foo
lda #<123
lda #>bar;test
lda #>444 ; testing
foo = 1 & 5
    indentation
Re: Syntax highlighting test
by on (#127639)
...fail? :D :beer:
Re: Syntax highlighting test
by on (#127643)
Nope, it's client only. Works only with a specific Chrome extension I made. :)
Re: Syntax highlighting test
by on (#127645)
thefox wrote:
Nope, it's client only. Works only with a specific Chrome extension I made. :)

Ah.
Re: Syntax highlighting test
by on (#127668)
Let met guess: Once you get the Chrome extension working, you plan to port it to a client JS that the server can include in every page with a <script src="...">. Or do you plan to keep it Chrome-exclusive?
Re: Syntax highlighting test
by on (#127670)
tepples wrote:
Let met guess: Once you get the Chrome extension working, you plan to port it to a client JS that the server can include in every page with a <script src="...">. Or do you plan to keep it Chrome-exclusive?

Wasn't exactly my plan. First of all, the Chrome extension already works. I was just using this page to test the bug fixes I made for the Wiki syntax highlighter (since this was the easiest way because I was already using the same script in my Chrome extension).

The script could be used on this forum as well, it's not dependent on Chrome in any way, but it probably wouldn't be a good idea to highlight all [code] tags, since often they're used for things other than just 6502 code. We could add a new [6502] tag or something, I guess?
Re: Syntax highlighting test
by on (#127671)
Apparently there's some sort of latent support for syntax highlighting within phpBB. It is documented as treating [code=php] differently, but it strips out a lot of arguments from other [code=...] tags. That sort of disappoints me because I expected to be able to edit the [code] tag as a custom BBCode to pass the language name through as a data- attribute that a script can pick up on.