From: Gaetano G. <giu...@gm...> - 2010-05-03 17:57:21
|
Benny Baumann <Ben...@gm...> wrote on 03/05/2010 19:35: > Hi, > > Gaetano Giunta schrieb: >> Gaetano Giunta<gg...@ez...> wrote on 03/05/2010 12:29: >> >>> Hello list >>> >>> I am the current maintainer of the language files used for the eZ >>> Publish CMS. >>> >>> The files are available at: >>> 1. >>> http://svn.projects.ez.no/ezgeshi/trunk/extension/ezsh/lib/geshi/geshi/ezini.php >>> >>> 2. >>> http://svn.projects.ez.no/ezgeshi/trunk/extension/ezsh/lib/geshi/geshi/eztemplate.php >>> >>> >>> 1 is a specialized version of windows ini files, with an emphasis on >>> highlighting common errors (the ini parser in eZ Publish being quite picky) >>> 2 is the template language >>> > Thank you for your language files. I just had a short look at the files > and there are some points that still need some tweaking. I'll come back > to them later. > >>> The current status is quite good, but there are still some corner cases >>> that need to be covered. > Could you provide me one or two examples for each language file? Thanks for the prompt answer. Example files I use for testing are uploaded to the same svn: http://svn.projects.ez.no/ezgeshi/trunk/extension/ezsh/tests/ The .ini file is quite complete and documented, the .tpl still rather sparse. >>> Here are my questions: >>> >>> - the semicolon ';' char is not used in the ini language, it is >>> completely transparent. Yet geshi insists on treating it as symbol >>> (token separator?) >>> Is there some way to avoid this? > Have a look at the rendered source. Which class is the ; rendered as? > (You need enable_classes(true) for this). thanks, will do >>> >>> - the pipe char '|' is used in the template language, but it appears not >>> to be understood by geshi, eg. in the string >>> operator1()|operator2() >>> the 2nd operator is not highlighted. Is there some way to reach this? > You can ask GeSHi to chang the allowed characters before and after a > keyword. See PARSER_CONTROL-->KEYWORDS for more details. > > | is handled as<PIPE> internally, ; is<SEMI>. Note the langcheck > regarding those. I have seen that transformation in the code. The puzzling thing is that by default '| operator()' works, while '|operator()' does not... >>> >>> - in the template language, keyword names can be used in some different >>> contexts, where they are not keywords. >>> example of keyword usage {op1()|op2(op3())} {$var=op()} {$var|op()} >>> example of usage of a keyword name where it is treated as a variable >>> name: {op notanop=$val} >>> Is there some way to have this? > If you can't detect this from the environment itself, there's no real > way for GeSHi 1.0.X, but with a Cde Parser this shouldn't a problem with > GeSHi 1.2.X (Dev Version), though the developement version has a > somewhat different API. >> >> I forgot another one: >> >> standard template constructs are found enclosed within brackets, but the {literal} construct is used to allow writing javascript code. >> is there a way to prevent highlighting of strings between a {literal} tag and its closing {/literal} ? > Use a comment_regexp that matches the full<literal> tag until its > closing</literal> counterpart. Maybe use Look-Behind\Look-Ahead to > exclude the tags themself. This one I solved by settingh STRICT_MODE_APPLIES to GESHI_MAYBE, then defining one set of delimiters with HIGHLIGHT_STRICT_BLOCK set to true and one (the one using as {literal} delimiter) set to false >> >>> please note that I'm using the latest geshi version, where keywords are >>> parsed before regexps... > Although there are no parser changes, check against SVN trunk (1.0.8.8). >>> >>> thanks >>> Gaetano > Regards, > BenBE. > > > |