Hi! I would like to know if there are some kind of code the clean Page Template parser response I normally use the same type of structure in PT: Date definition first / Rendering code last The parser nature (I supose regular expresion search) don't replace \t and \n and if you see the resultant code it's very dirty For normal PT there are not problem (I prefer clean things but...) but in sindication files, etc... Did you know some kind of script to clean PT parser response? Thanks!!!!!
Garito wrote at 2004-9-17 11:40 +0200:
... The parser nature (I supose regular expresion search) don't replace \t and \n and if you see the resultant code it's very dirty
For normal PT there are not problem (I prefer clean things but...) but in sindication files, etc...
Did you know some kind of script to clean PT parser response?
At least I do not understand what you are looking for... -- Dieter
Dieter Maurer wrote:
Garito wrote at 2004-9-17 11:40 +0200:
... The parser nature (I supose regular expresion search) don't replace \t and \n and if you see the resultant code it's very dirty
For normal PT there are not problem (I prefer clean things but...) but in sindication files, etc...
Did you know some kind of script to clean PT parser response?
At least I do not understand what you are looking for...
Hi Dieter! If you create a PT like: <tal:b tal:define='global Message string:Hello, World!' /> <tal:b tal:replace='Message' /> the response will be: \n Hello, World! I would like to know if is possible to delete \n automatically (or programmatically) understanding this \n like the parser response to <tal:b tal:define ... /> but I don't want to delete "real" \n like <tal:b tal:define='global Message string: Hello, World!' /> <tal:b tal:replace='Message' /> (I don't want to delete this \n) <tal:b tal:replace='string: bla, bla, bla' /> Thanks for your responseS!
Garito wrote at 2004-9-18 17:12 +0200:
... <tal:b tal:define='global Message string:Hello, World!' /> <tal:b tal:replace='Message' />
the response will be: \n Hello, World!
I would like to know if is possible to delete \n automatically (or programmatically) understanding this \n like the parser response to <tal:b tal:define ... />
If it is possible (in principle, it is), it will be very difficult because it is not easy to distinquish "real" from artificial "\n". I would not care about such estetics. If you think, you have to care, you must write your ZPT such that "\n" is not generated where you do not want one. In your example above, you could for example use: <tal:b tal:define='global Message string:Hello, World!' /><tal:b tal:replace='Message' /> -- Dieter
participants (2)
-
Dieter Maurer -
Garito