When entering the # as the first charcter in the first line, it doesn't change to 1.

# one?

Comments

arhip’s picture

When using Mediawiki example for ordered/unordered list, if the list is placed at the end of a content, there should be a newline after that list for Mediawiki filter work properly.

# one?
       <-- here should be a newline

or

* item
       <-- here should be a newline
amitaibu’s picture

So, if user wants to enter something like this:

# Hello
# To
# World

he should actually enter?

# Hello

# To
# World
arhip’s picture

No, for input like this

# Hello
# To
# World

User should enter

# Hello
# To
# World
            <--newline

The first example (# one?) doesn't work as expected because the input only contains one line. As long as I've tried, the input only failed for the last item that placed at the end of the content (i.e. there is no "enter" after the last line). Since # one? is only one line, then that line is the last line too.

amitaibu’s picture

Hi,
In my system it works differently

User enters:

# Hello
# To
# World 

(and after ''World'' no new line)

But gets:

#Hello
1. To
2. World
arhip’s picture

Oh, in my system it works well. If you don't mind, you can tell me Input Filters being used, full input, and a sample of generated HTML (not the snapshot).

amitaibu’s picture

Input filters being used for "Filtered HTML", by order:
1. URL filter
2. HTML filter
3. Line break converter
4. MediaWiki
5. unPHP
6. Working Units
7. PHP evaluator

Full input by user:

# hello
# world

Full HTML (View page source):

    
  <div class="content">
    <p># hello<br />
<ol><li> world</p></li></ol>
  </div>
arhip’s picture

I think I know the problem. When user inputs:

# hello
# to
# world

Filter 3 (Line break converter) convert it into:

<p># hello<br/>
# to<br/>
# world</p>

Since Mediawiki list get recognized only when the # sign placed leftmost, then Filter 4 converts again into:

<p># hello<br/>
<ol>
  <li> to<br/></li>
  <li> world</p></li>
</ol>

which would break the structure (notice the closing </p>).

So, for these filters work properly, you should rearrange Line break converter down below Mediawiki filter. And make sure there is a newline at the end of that list.

# hello
# to
# world
 
amitaibu’s picture

Status: Active » Fixed

Re-ordering filters worked properly. thank you.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.