Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 31

Thread: Syntax Highlighting (is it possible?)

  1. #11

    Syntax Highlighting (is it possible?)

    Testing...

    [pascal]
    TestVar := 1;
    [/pascal]

    Hmmm, that should have been:
    Code:
    TestVar := 1;
    it seems that have gotten rid of everything before the first number.

    [pascal]
    TestVar1 := 1;
    TestVar2 := 2;
    [/pascal]

    Yeah looks like everything before the first number, that should have been:
    Code:
    TestVar1 := 1;
    TestVar2 := 2;
    Let's try this:
    [pascal]
    var
    TestVar1 := 1;
    TestVar2 := 2;
    [/pascal]

    Hmmm, if you could post a link to the file you're using maybe I can help in someway. Two heads are better than one.
    My DGDev forum pascal syntax highlight settings:
    <br />[background=#FFFFFF][comment=#8080FF][normal=#000080]
    <br />[number=#C00000][reserved=#000000][string=#00C000]

  2. #12

    Syntax Highlighting (is it possible?)

    Quote Originally Posted by Xorcist
    Yeah that DarkEQ style is kinda ugly (no offense). As for the font, can't you just use:

    <font face="Arial, Courier New, Time New Roman" color="#xxxxxx">Text goes here</font>

    to specify the order in which fonts should be used if they are available? I'm pretty sure this would first use Arial, then Courier New, then Times New Roman then default to whatever the HTML page is set to use (given the availability of each).
    No, no effect. I'm using the <span> tag now and it works fine.

    There are a few 'bugs' but we're getting there :twisted:

  3. #13

    Syntax Highlighting (is it possible?)

    Yeah, I just noticed. I was running a couple "beta tests", the post above the last one has what I found.

    P.S. Once it is up and running, we might want to have a vote on the syntax colors (and background, that blue makes my head hurt).
    My DGDev forum pascal syntax highlight settings:
    <br />[background=#FFFFFF][comment=#8080FF][normal=#000080]
    <br />[number=#C00000][reserved=#000000][string=#00C000]

  4. #14

    Syntax Highlighting (is it possible?)

    Those tests you did look OK to me, except that the 1 in TestVar1 shouldn't really be highlighted. The file with all the stuff is here. It's not the actual file, it's a copy with a .txt extension.

  5. #15

    Syntax Highlighting (is it possible?)

    Hmm... that's weird, everything looks fine now, but it was messed up before, maybe it was just my machine.
    My DGDev forum pascal syntax highlight settings:
    <br />[background=#FFFFFF][comment=#8080FF][normal=#000080]
    <br />[number=#C00000][reserved=#000000][string=#00C000]

  6. #16

    Syntax Highlighting (is it possible?)

    I've fixed the 'number thing', it's still acting a bit weird but I haven't enough time to work on it all day It's highlighting reserved words, numbers, strings and comments, are there any others I need to add?

  7. #17

    Syntax Highlighting (is it possible?)

    Couldn't you get it to format it like Delphi does, rather than just highlighting things in different colours. Something like this:

    [Dammit I give up - basically, I meant use the same font as Delphi (Courier New) and put keywords in bold.]
    [size=10px][ Join us in #pgd on irc.freenode.net ] [ Sign the Petition for a Software Patent Free Europe ][/size]

  8. #18

    Syntax Highlighting (is it possible?)

    It seems to work fine! good job
    So when you have spare time you could put it on subSilver too.. It shouldn't be difficoult once you've done for darkeq..

    PS once you've completed it you could post the hack to http://www.phpbbhacks.com/ to share it if others need..

    Here's some test, just to look how it looks..
    [pascal]
    function parola(s:string):boolean;
    var i:integer;
    begin
    for i:=0 to form1.listbox1.items.count-1 do
    if lowercase(form1.listbox1.items[i])=lowercase(s) then
    begin
    result:=true;
    exit;
    end;
    result:=false;
    end;
    [/pascal]

    (added)
    Umm it seems like he don't hilight internal begin/end blocks..
    let's see:
    [pascal]
    begin
    begin
    begin
    if a=b then
    begin
    begin
    end;
    end;
    end;
    end;
    end;[/pascal]

    There is a little problem here
    If you save your data in a proprietary format, the owner of the format owns your data.
    <br /><A href="http://msx80.blogspot.com">http://msx80.blogspot.com</A>

  9. #19

    Syntax Highlighting (is it possible?)

    Thanks, how's that?

    I'd messed up the search string, whitespace is a strange thing ops:

  10. #20

    Syntax Highlighting (is it possible?)

    It works now! Well done!
    If you save your data in a proprietary format, the owner of the format owns your data.
    <br /><A href="http://msx80.blogspot.com">http://msx80.blogspot.com</A>

Page 2 of 4 FirstFirst 1234 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •