Topic on Project:Support desk

Jump to navigation Jump to search

Change the default number of blank lines before a heading (after section editing)

NBarto (talkcontribs)

When editing a section (or subsection, etc.), exactly one blank line is kept between the edited section and the following. Editing the entire page source does allow to add multiple blank lines.

How do I change this behavior and control the default number of blank lines before a heading?

Ciencia Al Poder (talkcontribs)

What do you want to change? the blank likes in source code (which will also reflect more space when reading an article) or only when reading the article?

NBarto (talkcontribs)

The source code.

(I suppose with CSS one can control vertical space before headers, but for flexibility reasons I'd like to only alter the source code.)

This post was hidden by NBarto (history)
Ciencia Al Poder (talkcontribs)

On Manual:Parser.php there's a extractSections() method there's a line:

$outText .= $newText . "\n\n";

Maybe you can add more newlines there (I'm not sure if this will do what you want). However, this can cause other side effects, and your change will be lost on next upgrade.. Basically, this is not configurable.

NBarto (talkcontribs)