Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEVAwUBT4qOdZw3120Y2Wc/AQIBkwf9FhT9Ap0e6nW1Po7cBx4ueBo+H12Iw9oC
vtPYfB0yjbRagjRiVRtX/oDlylGjJjrmbuSbRcbBD4/tp2ly1DnLB3zpmzBGRbu7
+lzypX82yXs2FpDF32p4QuGgMxVVEG3CU1TtAZDi+FwQ655mursIdFdFnrOH0X0R
tdi/Q7nBZz9JcYJ8dyjY2iQjltz0CAA26YVMeSHZHaNNaqPqCdf5Dv0KeX9iDRS3
3nSqTQgg8tnhu51GaSXEVVQ+K8Q3PiWe2JnWx+4ON8C80dB7G4Guc5JHTq4U8++g
LUyMSYtNqFtm/kl5YDB2BsMaedqon5+00bmx2mwJcXE37NyGGTAAtQ==
=5Rt5
-----END PGP SIGNATURE-----
Hi,
Am 14.03.2012 10:50, schrieb Gaetano Giunta:
> Benny Baumann wrote:
>> Hi,
>>
>> I'll have to dig into this one, but usually this kind of bug arises
>> from a problem with the regexps used inside the language file.
>> Especially the ones used in the ini.php (and the ones in php.php) are
>> quite nasty sometimes; thus good knowledge of PCRE is advised ;-)
>
> I think I have a convincing explanation for this case:
> 1. geshi adds a whitespace at the beginning of file before starting the
> parsing
> 2. while parsing (regexp parts), my code matches that whitespace, and
> geshi replaces it with a "<span etc...> </span>" tag
> 3. after parsing is done, geshi removes the added whitespace at the
> beginning of file. Except that this is not a whitespace anymore but a
> "<" character
>
Looks like the problem. If possible rewrite your regexp using
look-behinds to match this whitespace instead of matching it literally;
if possible. Otherwise avoid matching \A\s in your expression. I think
this should solve the prblem.
>>
>> Am 13.03.2012 18:34, schrieb Gaetano Giunta:
>>> I am using the language file attached to validate the ini settings
>>> files of eZ Publish (tested on geshi 1.8.6 and 1.8.10).
>>>
>>> It mostly works, but when I try to analyze the following file (2 lines):
>>>
>>> [RegionalSettings]
>>> TranslationExtensions[]=monextension
>>>
>>> I get the following output:
>>> span style="background-color: yellow;"> <span style="">[</span></span>RegionalSettings<span style="">]</span>...
>>>
>>> IE. in the results the opening angle bracket for "span" is missing.
>> I remember there was a bug showing simular behaviour years ago. As
>> mentioned above: I've to dig into this a little.
>>>
>>> This does not happen if there is eg. an empty line at the beginning of the file being highlighted.
>>> Is it due to a bug in the parser itself, or is something wrong with the language definition?
>> Hard to say off-hand, but I guess probably the parser has some
>> trouble. I'll come back with more details as they are found.
>>>
>>>
>>> Thanks
>>> Gaetano
>>>
>>> ps: any chance to get the ezini and eztemplate language definitions included in the next release? I submitted them a long time ago...
>> Since 1.0.8.10 quite some time went by and I'm still working to fetch
>> up on the releases. Seems as if
>> - either I missed that mail
>> - there was some problm in the language file (which usually leads to a
>> small mail about the issue asking to try fixing it (usually
>> accompanied with some hints).
>>
>> IDK what's it in this case ^^ Though I'll review the language files.
>> If you verified them against the langcheck.php they should be okay.
>>
>> Best regards,
>> BenBE.
>>
No comments:
Post a Comment