gnosygnu / xowa

xowa offline wiki application
Other
374 stars 41 forks source link

alignment difference on page #355

Open desb42 opened 5 years ago

desb42 commented 5 years ago

Using the http-server setup for xowa - this makes comparing with mediawiki easier I have found a number of instances of this problem. An example is de.wikipedia.org/wiki/Blade_Runner (this is not restricted to dewiki I have see this effect on a number of pages on a number of wikis) blade_runner The xowa version has an extra gap Looking at the wikitext for this page it starts ...

{{Dieser Artikel|behandelt den Film. Zum Computerspiel siehe [[Blade Runner (Computerspiel)]].}}

{{Infobox Film
| Bild             = Der blade runner.svg
| Deutscher Titel  = Blade Runner

If I were to remove the blank line between the two templates, the alignment issue is no longer there

I suspect xowa is treating the blank line as a new paragraph and mediawiki is somehow choosing to ignore it (possibly some form of startup mode?)

I find it very useful to be able to compare visually. This is being very picky

desb42 commented 5 years ago

To give another more extensive example in another wiki

Given the wikitext in en.wikibooks.org/wiki/Algorithms

{{Featured book}}

<center>[[Image:AlgorithmsTitleImage.png]]</center>

{{collection}}
{{Print version|Algorithms/Print version}}
{{prerequisite|Data Structures}}
{{clear}}

The following comparison between xowa and mediawiki shows that there are two visual issues. algorithms

The first, is related to the blank lines in the wikitext. Changing the wikitext to

{{Featured book}}
<center>[[Image:AlgorithmsTitleImage.png]]</center>
{{collection}}
{{Print version|Algorithms/Print version}}
{{prerequisite|Data Structures}}
{{clear}}

removes the visual difference

The second is more subtle. Between the box 'This book has a collection' and the box 'A printable version', xowa has a thicker line. By changeing the wikitext to

{{Featured book}}
<center>[[Image:AlgorithmsTitleImage.png]]</center>
{{collection}}{{Print version|Algorithms/Print version}}
{{prerequisite|Data Structures}}
{{clear}}

removes the visual difference

This issue is due to an extra 'paragraph' \

\
\

being inserted

Somehow mediawiki parsing decides that blank lines do not generate paragraphs in these instances

However on the same page is an example the other way around Mediawiki is inserting a paragraph and xowa is not

The wikitext (towards the bottom of the page)

The following books list Algorithms as a prerequisite:
<dynamicpagelist>
  category=Algorithms/Prerequisite
  namespace=Main
  suppresserrors=true
</dynamicpagelist>

== Sources ==

algorithms2

Note, there is a larger gap between 'Further Reading' and 'Sources' in mediawiki by adding an extra line to the wikitext the same visual effect can be achieved

The question is what does mediawiki do that xowa does not (or is it the other way round)