Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6900931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:36:36+00:00 2026-05-27T07:36:36+00:00

In MediaWiki (wikipedia’s) wiki syntax, is there a way to have a numbered list

  • 0

In MediaWiki (wikipedia’s) wiki syntax, is there a way to have a numbered list with a code block in the middle?

For example:

# Number 1
# Number 2
  Indented section that will become a code block
# Number 3
# Number 4

What happens in MediaWiki is you end up with something like this:

1. Number 1
2. Number 2
   Indented section that will become a code block
1. Number 3
2. Number 4

(Note how “Number 3” and “Number 4” are reset as 1 and 2… It looks like StackOverflow is much smarter than MediaWiki, i had to put my example in PRE tags to make it screw up!)

I know you can indent text using “#:” syntax…

# Number 1
# Number 2
#: Indented section that will merely be indented
# Number 3
# Number 4

…but I really would like to get the same visual CSS class for my code even if it’s in a numbered list.

It gets even more entertaining with nested lists. This syntax…

# MainEntry 1
## Number 1
## Number 2
# MainEntry 2
## Number 1
## Number 2
  Indented section that will become a code block
## Number 3
## Number 4

…becomes…

1. MainEntry 1
   1. Number 1
   2. Number 2
2. MainEntry 2
   1. Number 1
   2. Number 2
      Indented section that will become a code block
1. 1. Number 3
   2. Number 4

(Note how “Number 3” is now “1. 1.”)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T07:36:36+00:00Added an answer on May 27, 2026 at 7:36 am

    You could try the following wiki syntax, it works for me on 1.17

    # one
    #:<pre>
    #::some stuff
    #::some more stuff</pre>
    # two
    

    It is not perfect, because you end up with a more indent but it does allow one to use the wiki syntax for correctly formatted pre blocks over multiple lines.

    As previously mentioned, the other proper way would be to use HTML mark up.

    <ol>
    <li>one</li>
    <li>two</li>
    <pre>some stuff
    some more stuff</pre>
    <li>three</li>
    </ol>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Current versions of MediaWiki have the front page accessible via http://www.example.com/wiki/index.php/Main_Page Instead of the
I can't get MediaWiki to work on Nginx. I have it in my /var/www/domain.com/htdocs/wiki
We have two mediawiki (like wikipedia) installations. One is public and one is internal.
Question: I am creating a wiki software, basically a clone of wikipedia/mediawiki, but in
I had just installed MediaWiki. What must I do to have wikipedia style templates
In Mediawiki, I'm trying to find a way to block access to some of
I have a javascript widget which fetches articles from Wikipedia through MediaWiki API (http://en.wikipedia.org/w/index.php?title=Main_Page&action=render).
MediaWiki has a great built-in way for finessing the display of images, e.g. from
i have a mediawiki and jomsocial challenge. My goal is to encourage knowledge transfer
On my wiki implemented by the MediaWiki interface, I am receiving a Failed to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.