About this document
Goals
The following description should give you an impression how the Mailnews quote recognition and displaying function for plain and flowed text works, in part to enable you to customize the appearance to your pleasure.
Audience
This document is aimed1 at users who know CSS.
Description
Recognition
Flowed
With format=flowed, not only flowing paragraphs are marked unambiguously, but also quotes.
So, you know the quote level for sure.
Plain text
The quote level is determined by the number of plain text "cite tags" at the very beginning of the line.
Both "> " and ">" are recognized as cite tag.
(Much more are recognized, if QUOTE_RECOGNITION_AGGRESSIVE
is defined during compilation of Mozilla.)
Generation
After being recognized, the structure of the msg is reflected in HTML.
Ideally, the emitted HTML is readable with all HTML viewers.
Mozilla-specific formatting should be added only by Mozilla's stylesheets.
Unfortunately, we're not there yet, mostly because stylesheets can't read preferences.
That's why, for the viewing case, there is some additional formatting information written into the emitted HTML.
It should be as less intrusive as possible, though.
The following is true for the viewing case and quoting case.
Structure
The whole msg is wrapped in a div
, whose class
reflects the original format of the msg.
Quotes, including nested quotes, are wrapped in blockquote type=cite
s.
Blocks of text are wrapped either in pre
s or tt
s, depending on the format and type of the text.
Plain text
The outmost div
has the class moz-text-plain
.
Blocks are wrapped in pre wrap
s.
(The wrap
attribute might change in the future, as not all HTML viewers support it.)
Their whitespace is copied 1:1 into the resulting document.
Cite tags are wrapped in a span class=moz-txt-citetags
(one for each line).
Flowed
The outmost div
has the class moz-text-flowed
.
Currently, linebreaks are converted to br
s.
Thus, blocks are wrapped in tt
s.
Preferences
The preferences "Wrap long lines" and "Graphical quotes" (the latter only for plain text) are added as attributes wrap=true
/false
and graphical-quote=true
/false
to the outmost div
, if applicable.
If specified by the user, styling preferences for quotes (italic/bold, size, color) are written as inline stylesheets to the blockquote element.
Otherwise, there is not style attribute.
Known failures
- Supercite's default attribution line
(e.g. ">>>>> "BB" == Ben Bucksch <ben@example.net> writes:")
is recognized as quote of level 5.
(Supercite is often used by Emacs/VM users.)
- Added lines in "default" diffs are falsely recognized as quote
Glossary
All definitions are only valid for the scope of this feature and not generally applicable.
- blockquote
- A block of text, marked as quote by being wrapped with
blockquote type=cite
.
Like quotes in HTML msgs. Often displayed with vertical bars on the left.
- block
- One chunk of quote or new text.
Can be multiple paragraphs.
Usually (only) ends, if author changes.
- quote level
- Current number of nested quotes.
In text msgs usually the number of >s at the beginning of the line.
- plain text
- Not flowed (strictly, flowed is also plain text, but I need a name for it).
Most other mailers send msgs in this format.
- flowed
- format=flowed, RFC2646.
Mozilla Mailnews and Eudora send text msgs by default in this format.
Looks like plain text in UAs, which don't know it.
This format unambiguously marks not only (many) flowing paragraphs (a chunk of text without linebreaks), but also quote the level.
- text
- Not HTML (strictly, HTML is also text, of course, but I need a name for it).
Plain text or flowed.
-
- Entity for non-breaking space.
1
AIM is a trademark of AOL.
The concept of human-human communication is patented by AOL.