#79 Higlighting does not work properly

open-later
nobody
None
5
2007-01-23
2005-06-26
SHRIKEE
No

When in PHP a line is written like so:

$p4="?>";

the highlighter sees this as the end in PHP

Obviously the code isnt done then.

Script works highlight stinks....

Any fix/workaround?

Discussion

  • Logged In: YES
    user_id=99702

    Yes there's one, but it's awkward.
    You must implement the OnCheckEndMarker of your PHP Scheme
    and set aMarkerLen to 0 or aMarkerText to '' aproprietately.
    Unfortunately the Markers aren't searched in the same order
    as the tokens are parsed; you can't simply use the context
    information from SynMultiSyn.CurrScheme and .GetTokenId from
    current (sub)highlighter. You'll have to parse all line up
    to aStartPos.

     
    • status: open --> open-invalid
     
    • status: open-invalid --> open-later
     
  • Logged In: YES
    user_id=99702

    Err, wrong Resolution.
    This case should be quite easy to fix, so it might be worth.
    Unfortunately I plan to fix this since ever and always get
    back to thinking it's a waste of time and we'd better spend
    it on dynamic highlighters...

     
  • Krystian Bigaj
    Krystian Bigaj
    2005-06-27

    Logged In: YES
    user_id=1158522

    It's not bug. TSynMultiSyn works on RegExpr, simple search
    start/end tags (as text, not tokens).

    ps. Now I work on one big highlighter for (X)HTML, CSS, JS,
    PHP. For more info. go here:
    http://flatdev.dotgeek.org/item_view.php?project=2&id=1
    (latest public demo in first comment at bottom). For HTML
    and CSS now (not public) there is an almost full syntax and
    property checking (rules for parsing from W3C.org). Support
    for PHP and JS in about 2-3 weeks.

    ps2. Your example ($p4="?>";) will work fine with this
    highlighter.

     
    • milestone: --> 307039
     
    • labels: 672435 -->
    • milestone: 307039 -->