#764: WebComment: better support for ordered and nested lists
--------------------------+---------------------------
Reporter: jcaffaro | Owner:
Type: enhancement | Status: new
Priority: minor | Milestone:
Component: WebComment | Version:
Resolution: | Keywords: washing alert
--------------------------+---------------------------
Description changed by jcaffaro:
Old description:
> When using the rich text editor in WebComment, HTML lists markup is
> always transformed to a series of lines prefixed with "*" when sending
> the email notification, even if the list is an ordered one or contains
> nested sections
>
> '''Case 1'''
> {{{
> <ul>
> <li>foo</li>
> <li>bar</li>
> </ul>
> }}}
> results in:
> {{{
> * foo
> * bar
> }}}
>
> '''Case 2'''
> {{{
> <ol>
> <li>foo</li>
> <li>bar</li>
> </ol>
> }}}
> results in:
> {{{
> * foo
> * bar
> }}}
>
> '''Case 3'''
> {{{
> <ol>
> <li>foo
> <ol>
> <li>nested foo</li>
> </ol>
> </li>
> <li>bar</li>
> </ol>
> }}}
> results in:
> {{{
> * foo
> * nested foo
> * bar
> }}}
>
> While '''Case 2''' would better be transformed to:
> {{{
> 1. foo
> 2. bar
> }}}
>
> and '''Case 3''' would better be transformed to:
> {{{
> 1. foo
> 1 nested foo
> 2. bar
> }}}
>
> (or ''1.1 nested foo'', but this is no the default behavior of nested
> ordered lists)
>
> The {{{handle_starttag(..)}}} function of the {{{EmailWasher}}} class (in
> {{{webcomment_washer.py}}}) can be easily extended to support these
> behaviours.
New description:
When using the rich text editor in WebComment, HTML lists markup is always
transformed to a series of lines prefixed with "*" when sending the email
notification, even if the list is an ordered one or contains nested
sections
'''Case 1'''
{{{
<ul>
<li>foo</li>
<li>bar</li>
</ul>
}}}
results in:
{{{
* foo
* bar
}}}
'''Case 2'''
{{{
<ol>
<li>foo</li>
<li>bar</li>
</ol>
}}}
results in:
{{{
* foo
* bar
}}}
'''Case 3'''
{{{
<ol>
<li>foo
<ol>
<li>nested foo</li>
</ol>
</li>
<li>bar</li>
</ol>
}}}
results in:
{{{
* foo
* nested foo
* bar
}}}
While '''Case 2''' would better be transformed to:
{{{
1. foo
2. bar
}}}
and '''Case 3''' would better be transformed to:
{{{
1. foo
1. nested foo
2. bar
}}}
(or ''1.1 nested foo'', but this is no the default behavior of nested
ordered lists)
The {{{handle_starttag(..)}}} function of the {{{EmailWasher}}} class (in
{{{webcomment_washer.py}}}) can be easily extended to support these
behaviours.
--
--
Ticket URL: <http://invenio-software.org/ticket/764#comment:1>
Invenio <http://invenio-software.org>