nesdev.com
http://forums.nesdev.com/

Syntax highlighting test
http://forums.nesdev.com/viewtopic.php?f=15&t=11157
Page 1 of 1

Author:  thefox [ Fri Apr 11, 2014 6:42 am ]
Post subject:  Syntax highlighting test

Code:
Testing SyntaxHighlighter:
lda #<foo
lda #<123
lda #>bar;test
lda #>444 ; testing
foo = 1 & 5
    indentation

Author:  cpow [ Fri Apr 11, 2014 9:03 am ]
Post subject:  Re: Syntax highlighting test

...fail? :D :beer:

Author:  thefox [ Fri Apr 11, 2014 11:19 am ]
Post subject:  Re: Syntax highlighting test

Nope, it's client only. Works only with a specific Chrome extension I made. :)

Author:  cpow [ Fri Apr 11, 2014 11:25 am ]
Post subject:  Re: Syntax highlighting test

thefox wrote:
Nope, it's client only. Works only with a specific Chrome extension I made. :)

Ah.

Author:  tepples [ Fri Apr 11, 2014 3:18 pm ]
Post subject:  Re: Syntax highlighting test

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?

Author:  thefox [ Fri Apr 11, 2014 4:19 pm ]
Post subject:  Re: Syntax highlighting test

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?

Author:  tepples [ Fri Apr 11, 2014 6:55 pm ]
Post subject:  Re: Syntax highlighting test

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.

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/