Page MenuHomePhabricator

Customizable replacement of HTML line breaks for transcluded pages in Wikisource
Open, Needs TriagePublic


For example, in this page:

Entered text are:


Displayed text are:

這裏印出的八張照片,是由一 個逃亡的共幹從大陸偷帶到香港的 。照片所拍攝的事實發生在廣東佛 岡縣,時間是民國四十一年七月廿 ....

The space should be removed.

This feature is badly needed in Chinese Wikisource and maybe in other Wikisources for languages that do not have word separator.

Line breaks are sometimes kept in source of Chinese Wikisource "page" namespace to make proofreading easier. However, they are passed to HTML, which automatically add space between lines.

How about adding a new option in "pages" to replace HTML line breaks with a customized string? Like

<pages index="file.pdf" from="18" to="24" breaks="" />

to replace HTML breaks with nothing, which means to remove the line breaks. Note, it does not change "</p><p>" added by two line breaks in source.

This will be very useful for Chinese Wikisource. This would also not change existing pages, disturbing no one.

Related task:

Event Timeline

wmr updated the task description. (Show Details)

Can this not simply be done with CSS?

<div style="white-space:pre;">



Which can be applied globally, via templates, or with T215165, per-index.

2021-03-26_224710_295x297_screenshot.png (297×295 px, 41 KB)