On 25 May 2012 17:37, Carnë Draug <carandraug+dev@gmail.com> wrote:
> Hi everyone
>
> me and Juan Carbajal have wrote a language file to highlight
> GNU/octave source code that is attached.
>
> There is only one problem that we could not fix with adding URLS. We
> have 10 different groups on KEYWORDS, 5 of them with rules for URLs.
> The rule is the same for all of them. However, 1 of them (the very
> first) doesn't work.
>
> The following code:
> uint32
> cell
>
> creates
> function/uint32.html">uint32
> function/cell.html">cell
>
> with links for
> http://octave.sourceforge.net/octave/%3Cspan%20class=
> http://octave.sourceforge.net/octave/%3Cspan%20class=
>
> The really weird thing is that keywords from the other lists, even
> though having the same style and URL rule, work normally.
Hi everyone
I managed to fix the problem on the file but I think it is also a bug
with GeSHi. The problem is that one of the keywords (function) is also
a word on the URL. The keyword function was on the element #4. The
only words that were giving me a problem were on element #1. When I
swapped those two, the problem went away. Still, this sounds like a
bug to me.
Another problem I noticed, shows up when one of the keywords is DOT,
whcich will also break the URLs (since the actual dots are replaced by
<DOT> and then highlighted. Again this will only happen for the
elements that have smaller key # than the one with the keyword DOT). I
noticed this since octave actually has a function `dot', and before I
made the match case sensitive, this also broke the highlighting.
Should I report this bug somewhere? I do not know how to code PHP,
fixing this is beyond my abilities.
Anyway, please see attached the final version of the octave.php
language file and I hope it's acceptable for inclusion on GeSHi. It
passes on langcheck.php file amd we tried to leave useful comments on
the file which should hopefully make clear what each option we made.
Carnë
No comments:
Post a Comment