Any better way to create MediaWiki numbered lists?

后端 未结 11 906
梦如初夏
梦如初夏 2021-02-01 13:09

When using MediaWiki\'s markup language, the only thing that I hate is creating numbered lists. The only way I know to create a list is to do something like this:



        
11条回答
  •  醉梦人生
    2021-02-01 14:00

    Following the link to Wiki Help, I found an example that meets what I think are the implied requirements

    1. The list needs to keep numbering
    2. Sometimes the "Somestuff" should be on it's own line in the source

    To get (1) there are a few solutions proposed. Bug one way is to use paragraph delimiters around the extra "somestuff".

    Example 1:

    # Paragraph 1.

    Paragraph 2.

    Paragraph 3.

    # Second item.

    To meet (2), you use paragraph marking in combination with commenting out the new lines (with ).

    Example 2:

    # Paragraph 1.<!--
      -->

    Paragraph 2.

    Paragraph 3.

    # Second item.

    Both examples display as

    Result:

    
        1. Paragraph 1.
           Paragraph 2.
           Paragraph 3.
        2. Second item
    

    Note that the comment eats all of the white space between the end of one element and the start of the next, which seems to be standard practice, and makes sense if you're trying to have whitespace without the "wiki effects" of the white space.

提交回复
热议问题