Corrente

If you have "no place to go," come here!

VL's block quote and italic test

vastleft's picture

Everything but this and the last line is in blockquotes (edited to remove the italics)

There is an ugly extra "line feed" above this text, the first paragraph of the blockquote. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy.

There's a missing "line feed" before this text, the start of the second paragraph of the blockquote. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy.

All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy.

All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy.

All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy. All work and no blogging makes Jack a dull boy.

This is the last line.

0
No votes yet

Comments

vastleft's picture
Submitted by vastleft on

It used to be that only the first paragraph was indented in the new site. Now, all the paragraphs are indented, but there’s a missing blank line between the first and second paragraphs.

The problem with italics dropping off between paragraphs of the blockquotes seems to have been fixed.

The ugly extra blank line before the blockquote persists, though.

See also:
http://www.correntewire.com/content/fith...

admin's picture
Submitted by admin on

1. Input formats. Drupal pipelines the markup you type in (which is all that is stored) through a series of "input formats" or filters to the markup it displays, so the order of the filters can affect the output. ("Filtered HTML" and "Full HTML" are named pipelines.) I changed the order of the filters and added an HTML corrector filter to change bad markup. I think both posts now display as you wish.

2. Ill-formed markup. Markup has to be properly nested, and that includes the markup generated by the filters above, one of which is turning newlines into proper HTML paragraphs. So, in the case above, the input:

<blockquote><i> ... [1]\n\n ... \n\n ... [2] </i></blockquote>

gets filtered into something like this output:

<blockquote>[A]<p><i> .... </i></p></blockquote>[B]<p> ... </p></i>[C]

with the underlined material added. The formatter encounters the line feeds at [1]. Therefore it needs to wrap the content preceding in a P tag, so it goes before the last open tag and wraps it at [A]. Now the open tags are <blockquote><p><i>... So it closes them all at [B]: </i></p></blockquote>. Later on at [2] it encounters the closing </i> tag, which it throws away at [C].

If the filter did not do that, the markup would look like:

<blockquote>[i]<p>[ii]<i> ... </p><p> ... </p></i></blockquote>

But that cannot be, as the <i> opened at [ii] must be closed before the <p> opened at [i] can be closed.

We sometimes see the same issue where users put a <--break--> in the middle of a formatted blockquote, and the input formatter gets "confused" because, as above, it closes everything.

We also encourage users not to mark up blockquotes as you have done -- that is, to use the blockquote only -- exactly because adding in other tags leads to this sort of problem (besides being uglier). And also because uses tend to forget to close them (which the HTML Corrector filter fixes, thereby training them in bad habits (sigh)).

The upshot is a compromise where we get well-formed markup as output (which is good for all browsers, readers for the blind, etc.) but where the user's intent, if expressed in ill-formed markup, may not be expressed.

One could argue that the input formatter should not close everything at [B]. That's a simple rule, though, and parsing bad markup "in the wild" can get complex, and slow. So you go to format with the input formatter you have.

One could also argue that, with a JavaScript WYSIWYG editor like TinyMCE (say), users would get good markup by definition, at least going forward. When I tested such an editor, there was a big performance penalty to pay, and editors like that bring their own problems with the data. (There is also a penalty for power users like ourselves, because entering tags by clicking on the damned little buttons is slower than typing in the damn tags).

So, I'm hoping re-arranging the order of the input filters, as shown, is good enough to go on with.

NOTE The ugly whitespace is a stylesheet issue. Since the stylesheet is working on markup on the output side of the pipeline, the pipeline needs to be correct first.

vastleft's picture
Submitted by vastleft on

What was the bad markup that I used? Are you saying that styles like italics need to be done paragraph by paragraph? Do we need to add some combination of <p> and/or <br> tags to make blockquotes format properly between paragraphs #1 and #2?

All I know is that this is good markup:

<blockquote>Beginning January 20, America will truly be exceptional!</blockquote>

And this is bad markup:

<blockquote>I'm concerned about whether Obama will provide the progressive reform we need.</blockquote>

admin's picture
Submitted by admin on

Those two examples look identical to me: Two blockquotes open and close.

See my example again, and think of it this way: Before you hit the carriage return twice to make a new paragraph, close any tags that are inside the paragraph, like I or B. And don't try to format blockquotes with I. That will solve 90%+ of the problems. Most users do this already.

vastleft's picture
Submitted by vastleft on

But I still wonder what to do about fixing the missing LF between paragraphs 1 and 2 in blockquotes. A lot of old posts are affected.

I've taken the italics out of the original post, above, and the missing LF problem persists.

admin's picture
Submitted by admin on

It's probably certainly stylesheet-based white space, and not an extra BR or P; line feeds would be converted into spaces in any case as standard XHTML. As I said:

NOTE The ugly whitespace is a stylesheet issue. Since the stylesheet is working on markup on the output side of the pipeline, the pipeline needs to be correct first.

If the rule is that the first P in a BLOCKQUOTE needs less space above and more below, then the pipeline is operating in a consistent manner and therefore a stylesheet solution can be applied.

Gotta go. And please, I know we're not working with a perfect system here. The key point is to align the order of the input filters with the normal behavior of the great majority of users, not to seek edge cases.

vastleft's picture
Submitted by vastleft on

Just trying to find out what the simplest HTML habits are for getting reasonable results.

admin's picture
Submitted by admin on

... in the new system, which is subtly different in a number of ways. Here are the rules for Filtered HTML:

1. Mentally divide tags into two categories: block (like a para) and inline (like italic or anchor).

2. Don't put inline tags between blocks.

3. When you have opened a block and want to close it, close any inline tags that you opened, then close the block. See NOTE.

4. Always control the BREAK.

5. Only put the BREAK between BLOCKs.

6. Newlines close one para block and then open another.

This is what most people do anyhow, I think.

NOTE Close tags in the reverse order that you opened them: A B C ... C B A and not A B C ... B C A.

Submitted by lambert on

There's too much at the top of the quote.

Submitted by jawbone on

for me.

How are comments saved--I just wrote a longish one (how unusual for me!) and hit the wrong key, maybe control, but I was reaching for the shift key with my left pinkie--anyway, got sent back a page and no comment when I clicked forward.

I've lost two comments so far, this one and yesterday by looking up a work on google, forgetting one can't do that and keep the comment.

Where is this save of which some speak??? Is there something I need to activate? If so, I want to do so, really, really badly!

admin's picture
Submitted by admin on

If you are POSTing, see if a blue "Autosave" form comes up after about 30 seconds or so. If it does not, please see if you have popups turned off, turn them on (or enter www.correntewire.com as an exception, as in FF) and then see if you see it.

Alas, so far as I can determine, AutoSave does not apply to COMMENTs, only POSTs. Sorry....

Aeryl's picture
Submitted by Aeryl on

He, he.

admin's picture
Submitted by admin on

I did a quick search, and though people have asked for it, autosave for comments does not exist (don't ask). So, for now we will have to live with a partial solution.

Submitted by jawbone on

n/t

Submitted by jawbone on

find any way to comment. And I believe I did join the group.

Also, can't get any comment settings to keep. Appears as threaded-expanded, but says it's Flat list-collapsed. I can't change newest to oldest or increase comments per page.

Also, where are the nice red markings for new comments?

And, of course, where is the prevent loss of comment feature?

T/U.

admin's picture
Submitted by admin on

1. Groups apply to posts not comments. This post is in the right group.

2. For red marked comments, see All posts or My posts.

3. I'll check into the comment settings.

4. The prevent-loss-of-comment feature awaits somebody writing it or altering the existing module. Good idea, though.

whaleshaman's picture
Submitted by whaleshaman on

Me, too -- same problems as jawbone here.

As suggested, I've changed cookie settings, emptied cache, reloaded browser, et cetera.

Those did "fix" some problems I was having, though I fear I still retain some "ugly whitespace" tendencies. ;-) [Thanks, vastleft.]