How are numbered lists implemented in the present grammar? Would it be hard (in future) to put in some sort of number-from provision or tell the parser not to insert a </ol>?
- d.
---------- Forwarded message ---------- From: Herta Van den Eynde herta.vandeneynde@gmail.com Date: 16 Jan 2008 13:23 Subject: Re: [Mediawiki-l] numbered list broken by image or template To: MediaWiki announcements and site admin list mediawiki-l@lists.wikimedia.org
On 16/01/2008, Kilian winkelklammern@texttheater.de wrote:
Am Mittwoch, den 16.01.2008, 13:38 +0100 schrieb Herta Van den Eynde:
When you use a numbered list, and insert an image or a template, the numbering is broken. E.g.
# one # two [[Image:some-image.png]] # three
will display:
- one
- two
Image:some-image.png
- three
Is there a way to restart the numbering where you left of, so that the third element still reads:
- three
Kind regards,
Herta
Hi Herta,
the problem is not the image but the line break. Here's how to mask it such as not to break the item:
# one # two<br/>[[Image:Some-image.png]] # three
~ Kilian
Thanks, Kilian. That does indeed solve the problem with images. Unfortunately many (most?) of our templates contain line breaks. Any way to work around those?
Kind regards,
Herta -- Herta Van den Eynde
"Life on Earth may be expensive, but it comes with a free ride around the Sun."
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
On 16/01/2008, David Gerard dgerard@gmail.com wrote:
How are numbered lists implemented in the present grammar? Would it be hard (in future) to put in some sort of number-from provision or tell the parser not to insert a </ol>?
How about a token to explicitly start an ordered list (how about #- (hash-dash) on a line by itself?), and if the list is explicitly started, it needs to be explicitly ended (by -#, say). If it's not explicitly started, then it behaves exactly as it does now.
David Gerard wrote:
How are numbered lists implemented in the present grammar? Would it be hard (in future) to put in some sort of number-from provision or tell the parser not to insert a </ol>?
- d.
Just make # equal to <li> if there's any open <ol>, create them if there isn't (probably the same should be done for * even while there won't bbe a visual difference). Then you can add <ol start=""> but avoid using <li>s for each item.
On 16/01/2008, Kilian winkelklammern@texttheater.de wrote:
# one # two<br/>[[Image:Some-image.png]] # three
Note that this can already be done like so:
# One # Two #: [[Image:Example.jpg]] # Three #: {{lipsum}} # Four
You do end up with a chunk of whitespace at the beginning of the line though.
On 1/17/08, David Gerard dgerard@gmail.com wrote:
How are numbered lists implemented in the present grammar? Would it be hard (in future) to put in some sort of number-from provision or tell the parser not to insert a </ol>?
<snip>
# one # two [[Image:some-image.png]] # three
It's arguable that the numbering should only restart after a double new line:
#one #two nasoehtusona ohtunehotnh #three foeau
#one
Of course, mediawiki doesn't concern itself with numbering, just with HTML code.
Would the above semantic change cause widespread fear and chaos?
Steve
On 19/01/2008, Steve Bennett stevagewp@gmail.com wrote:
It's arguable that the numbering should only restart after a double new line: Of course, mediawiki doesn't concern itself with numbering, just with HTML code. Would the above semantic change cause widespread fear and chaos?
I think it would be a *most* welcome addition to the syntax, myself. If the powers that be object on this basis, it'd be easy enough to make it do what it does now - just document it :-)
- d.
On 1/20/08, David Gerard dgerard@gmail.com wrote:
On 19/01/2008, Steve Bennett stevagewp@gmail.com wrote:
It's arguable that the numbering should only restart after a double new line: Of course, mediawiki doesn't concern itself with numbering, just with HTML code. Would the above semantic change cause widespread fear and chaos?
I think it would be a *most* welcome addition to the syntax, myself. If the powers that be object on this basis, it'd be easy enough to make it do what it does now - just document it :-)
I actually meant as a change to the current parser, not the vapourware one. :)
Steve
On 20/01/2008, Steve Bennett stevagewp@gmail.com wrote:
I actually meant as a change to the current parser, not the vapourware one. :)
Hell yes. Go for it :-)
- d.
wikitext-l@lists.wikimedia.org