PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Syntactic Keyword Coloring Script v0.3

Version 0.3 of the keyword coloring script is online. It introduces proper Tab handling, so tabs pad out to the next tab position, instead of always using 4 spaces to represent a tab. It also fixes a sporadic issue with greater than / less than signs.

The only remaining known issue is coloring of precompiler directives in special situations (like if the directive name is not immediately after the pound sign - "# include"). It also does not color #include filenames inclosed in greater than / less than signs yet (#include <stdio.h>).

Dan East
It's working worse than before under Mozilla Firebird :(.

To quote myself:
Use colons in style tags, not equal signs. HTML tag attributes should be opened with double quotation marks, not single marks. Single marks should be used within HTML tag attributes.
I missed a couple style tags. The corrected version will be online when Chris uploads it. Thanks for pointing that out.

Dan EEast
Chris uploaded the corrected version yesterday. Let me know if you are still having problems with your browser.

Dan East
The height is fine (no longer does the code tag render pages unreadable) however it's still wide, and the font for the about line seems a bit too large. (Mozilla Firebird)
Most of the time height doesn't stuff up, but I have found at least one topic where it does. Take a look at the screenshot below.

http://www.ids.org.au/~tmsturm/stuff/pm_firebird.png
Well, there are two problems. First, the summary line font should be much, much smaller. It is normally no bigger than the size of the code text.

The whole block out of position is a problem with the Code wrapper Chris implemented to add the scroll bars.

I'll take a look at the first problem, and ask Chris to look into the other one.

Dan East
Thankyou :).
Dan: Try switching from absolute to relative, and vice versa. Sometimes that seems to help with Mozilla.
Syntax highlighting is now almost perfect under Mozilla Firebird. The horizontal scrollbar overlaps the bottom of the table slightly, but that's probably just nitpicking :).

Thankyou again Dan and Chris.
Thanks, this new version works perfectly in the Safari web browser as well (ok, the horizontal scroller slightly overlaps the last line as Thomas described, but I can live with it).
Code boxes are empty or is it just my pc (Win2000 with IE5)?

Test:
Code:
//This is a code box.
I'm using Win2k with IE 6 and see "//This is a code box."

Dan East
Ok, it must be IE5. But I did see code on friday. Also the html source is quite mangled so you can't make out anything, but I guess you have to do that to format.
Finally looks perfect in Mozilla Firebird.
Anonymous wrote:
Ok, it must be IE5. But I did see code on friday. Also the html source is quite mangled so you can't make out anything, but I guess you have to do that to format.

Well, if you save as text, you can see the code. Whewwww, doggie!
To the person seeing problems with IE 5, are you using AdSubtract or other similar programs?

Can anyone else verify if the code formatting is working / not working with IE 5?

Thanks.

Dan East
I'm NOT using AdSubtract or anything that changes webpages. I did see code Friday and before. I can still look at the few, old pages that are still cached. I had thought that using W2K hibernation may have had some effect, but that was not it. I just now tried another PC with the same setup and the problem is the same. I'm using IE 5.00.3315.1000 that came with W2K(SP2). I will upgrade to IE6+ when I get around to it.
Was there a new version updated? Horizontal scroll bars work perfectly now, as far as I can tell, everything is fine in Firebird.
No code box on my Netscape 7.02 nor IE 5 (just a little blank in its place) :(
Can't see the code in IE5 (w2k) nor in Opera 7.11.
Dan: Perhaps PM can detect the browser and use a different code tag depending on the browser it finds? It looks like there are only 2 versions needed.

Working on IE6.
Just installed IE6. I can now see the code inside the boxes. Don't really notice anything fancy-schmancy about version 6 compared to ver5, but the page access/loading seems faster than before. Here's to Bill and the Windows "System Lords".