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

  • SEARCH
  • Home
  • 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 1076667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T21:27:40+00:00 2026-05-16T21:27:40+00:00

How does Wikipedia implement the edit this section feature for its articles, wherein a

  • 0

How does Wikipedia implement the “edit this section” feature for its articles, wherein a user can edit just a section of an article, rather than the whole article? I’ve tried crawling through mediawiki’s code by myself, but it’s a bit dense for me to understand. Here’s my guess (but only a guess):

User click’s on [edit] in an article. This links to the regular edit page, but with an additional parameter passed via GET in the URL specifying which section to edit. Without this extra parameter, Mediawiki would normally simply present the user with a form editing the entire page. But specifying a section to edit causes Mediawiki to extract ONLY that section and present it for editing.

What stumps me is how does Mediawiki parse out individual sections? From what I understand, MW doesn’t store the sections individually – it stores each ENTIRE VERSION of each version of the page as one big block of text (in addition to boatloads of metadata). Does MW simply look for H1, H2, H3, … tags, and use those to split up the text into regions when it renders the page? And when a user saves a revised section, does it look at the current version, re-parse the text into sections, and just “inject” the new version into a copy of the current version, which it then saves as a NEW version?

I assume my understanding of MediaWiki is grossly simplified, but I’m just trying to get a rough idea.

Thanks!

  • 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-16T21:27:41+00:00Added an answer on May 16, 2026 at 9:27 pm

    This might be a clue – from http://en.wikipedia.org/wiki/Help:Section. The sections use a specific markup as such:

    ==Section==
    
    ===Subsection===
    
    ====Sub-subsection====
    
    • Using the same heading more than once on a page causes problems.
    • When a section with a duplicate name is edited, the edit history and summary will be ambiguous as to which section was edited.
    • When saving the page after a section edit, the editor’s browser may navigate to the wrong section.

    Sections can be separately edited by clicking special edit links labeled “[edit]” by the heading, or by right clicking on the section heading, depending on the preferences set. This is called “section editing feature” (Preferences -> Editing -> “Enable section editing via [edit] links”). Section editing feature will take you to an edit page by a URL such as

    http://en.wikipedia.org/w/index.php?title=Help:Section&action=edit&section=2

    Note that here section numbers are used, not section titles; subsections have a single number, e.g. section 2.1 may be numbered 3, section 3 is then numbered 4, etc. You can also directly type in such URLs in the address bar of your browser.

    So it looks like the parser has a count of sections in the TOC and then uses the = tag to place the specific text into the editor.

    Here are some of the tables used:

    Page Table – (http://www.mediawiki.org/wiki/Manual:Page_table) – Each page in a MediaWiki installation has an entry here which identifies it by title

    Revision Table holds metadata for every edit done to a page within the wiki. Every edit of a page creates a revision row, which holds information such as the user who made the edit, the time at which the edit was made, and a reference to the new wikitext in the text table

    Text Table – holds the wikitext of individual page revisions.

    The contents of pages are stored as BLOBs. So it must parse in binary.

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was looking at this wikipedia article, and couldn't understand how the hell that
I'm implementing the A* search algorithm from this pseudo on wikipedia's article: function A*(start,goal)
The wikipedia article on Singletons mentions a few thread safe ways to implement the
Does anybody know why this function, when passed an invalid date (e.g. timestamp) to
I was reading a Wikipedia article about Java EE application servers here: http://en.wikipedia.org/wiki/Java_Platform,_Enterprise_Edition#Java_EE_5_certified It
I read an article on virtual table in Wikipedia . class B1 { public:
Are LINQ expression trees proper trees, as in, graphs (directed or not, wikipedia does
I try to implement C++ properties as templates as defined in WikiPedia template <typename
I had spend some time on this Bridge pattern example from wikipedia , however,
Based on Wikipedia's article on Bresenham's line algorithm I've implemented the simplified version described

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.