My favorites | Sign in
Logo
                
New issue | Search
for
| Advanced search | Search tips
Issue 1: html/xhtml: put <P> inside <BLOCKQUOTE>
  Back to list
Status:  New
Owner:  aureliojargas
Type-Defect
Priority-Medium


Sign in to add a comment
 
Reported by aureliojargas, Aug 05, 2008
In XHTML, the BLOCKQUOTE tag must have block elements inside. So any paragraph must be 
declared inside it:

<blockquote><p>Hello World.</p></blockquote>
 
Currently txt2tags doesn't add the P tag.

This rule may not be true in HTML, check it.
Comment 1 by aureliojargas, Aug 05, 2008
Comments by Raicho Nikolov:

I think I have an idea which can help you to solve the problem.

I have made a filter which put blockquotes without a problem.  Txt2tags naturally puts <p> tag inside. The filter is this:

%!postproc(xhtml):  {"  <blockquote>
%!postproc(xhtml):  "}  </blockquote>

So I have to write:

""" {"
alabala

""" "}

to have <blockquote> block

That's ugly and is not my suggestion - it only shows how it works. (although it has one advantage over the "natural way" - you 
can use it in web pages)

The idea is to have some close element for this kind of blocks. For example for lists we have a closing with two blank lines. 
Thus the program will know where the element starts and where the element ends. 

Opening and closing tag must differ - for example tab opens and two blank lines close. This way the markup will not change 
much. Probably this is doable with Pre-Post-Processing.

I hope that I am on the right way and you get the idea
Raicho

Comment 2 by aureliojargas, Dec 16, 2008
Check if in XHTML we can omit the P tag if there's only one paragraph inside it: <blockquote>Foo 
bar.</blockquote>.

If yes, an ideal solution would be to add the P tags only if there's two or more paragraph inside the quote.

But this could cause CSS troubles since we would have BLOCKQUOTE with and without P tags inside. Maybe it's 
best to just add it everytime, so the user knows it's always there.
Comment 3 by aureliojargas, Dec 16, 2008
Another change to the txt2tags would be to detect consecutive quotes (even with blank lines between) and join 
them in one big quote (fixing a longstanding txt2tags limitation of one-paragraph-only quotes).

It's easy to do in the current code, checking for BlockMaster.last contents.
Sign in to add a comment

Hosted by Google Code