[Home]WikiBugs/MixedList

UseModWiki | WikiBugs | RecentChanges | Preferences

 # Number one
 # Number two
 ** Bullet
 ** Another bullet
 # Number three, uh?

  1. Number one
  2. Number two
  1. Number three, uh?

But this works:

 # Number one
 # Number two
 ## Number two.one
 ## Number two.two
 # Number three

  1. Number one
  2. Number two
    1. Number two.one
    2. Number two.two
  3. Number three


I took a look into the code and have done it myself, hoping this have no unwanted side effect.

--- wiki.pl     Sun Apr 22 02:44:10 2001
+++ wiki.pl.new Sat Jul 12 13:34:37 2003
@@ -1275,7 +1275,8 @@
       if (@htmlStack) {  # Non-empty stack
         $oldCode = pop(@htmlStack);
         if ($oldCode ne $code) {
-          $pageHtml .= "</$oldCode><$code>\n";
+          $pageHtml .= "</$oldCode><$code>\n"
+           unless($oldCode=~/OL|UL/ && $code =~ /UL|OL/); # Treat lists equal
         }
         push(@htmlStack, $code);
       }


This is the side effect:

This

# bullet1
# bullet2
# bullet3
* number1
* number2
* number3

has to be written as

# bullet1
# bullet2
# bullet3

* number1
* number2
* number3

Another side effect, This:
#Number1
**bullet
**bullet

#Number2
**bullet
**bullet

#Number3
**bullet
**bullet
has to be written:
#Number1
**bullet
**bullet
#Number2
**bullet
**bullet
#Number3
**bullet
**bullet

or you get this:

  1. Number1

    1. Number2
      • bullet
      • bullet

      1. Number3
        • bullet
        • bullet

In my experimental (and still half-finished) rewritten parser I allow for the following syntax :

# Number one
# Number two
#* Bullet
#* Another bullet
# Number three

Which I personally feel is more logical as it clearly denotes the bullet list as being part of the number list.

I will be releasing my parser into WikiPatches when I finally finish it!

--DavidClaughton.


UseModWiki | WikiBugs | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited October 25, 2007 8:51 am by MarkusLude (diff)
Search: