Chad Woolley
2008-Sep-06 01:27 UTC
[webgen-users] <pre> tag content now parsed by redcloth?
Hi, Thanks for all the help so far. I''ve almost got my site upgraded. A few more problems, which I''ll address in separate threads. So, I had <pre> tags in several places which contained code - yaml, ERB, etc. Previously, these were all ignored - passed through verbatim and not parsed by webgen. Now, they appear to be parsed. First, How should I do the equivalent of a "pre" tag? Second, is this a bug? Do redcloth specs say pre tag content should not be parsed? Thanks, -- Chad
Thomas Leitner
2008-Sep-06 05:11 UTC
[webgen-users] <pre> tag content now parsed by redcloth?
> Thanks for all the help so far. I''ve almost got my site upgraded. A > few more problems, which I''ll address in separate threads.No problem!> So, I had <pre> tags in several places which contained code - yaml, > ERB, etc. Previously, these were all ignored - passed through > verbatim and not parsed by webgen. Now, they appear to be parsed.What is the input and what the result? This would help a lot in determining the problem.> First, How should I do the equivalent of a "pre" tag?This mostly depends on the markup processor in the processing pipeline. Your default processing pipeline is `tags,redcloth,blocks`, isn''t it? * If you used maruku, you would just indent everything that should stay verbatim by 4 spaces and voila. * Since you don''t use ERB on your pages, no ERB escaping is needed. Would be done by using <%% %> instead of <% %>. * A test shows RedCloth 3.0.4 leaves <pre> content alone but converts the usual suspects (<>) to be HTML compatible. For example: <pre> <%= hallo %> something *new* and @nice@ </pre> * some o*th*er becomes <pre> <%= hallo %> something *new* and @nice@ </pre> <ul> <li>some o<strong>th</strong>er</li> </ul> So this should work alright. You could always surround the <pre>-tags with <notextile> tags which forbid RedCloth to convert their content.> Second, is this a bug? Do redcloth specs say pre tag content should > not be parsed?I don''t know. Maybe there is a difference between RedCloth 3.x and 4.x in that regard. As far as I know <pre>-tags should be left alone by RedCloth. You may wanna ask this on the redcloth ML. -- Thomas