List of steps to reproduce (step by step, including full links if applicable):
- Create pages with <pre> tags containing start-of-line whitespace
- Check out these two revisions:
- https://fr.wikiversity.org/w/index.php?title=Utilisateur:Solstag/Mod%C3%A9lisation_des_R%C3%A9seaux_(M1_SIREN,_2022)/Activit%C3%A9_A&oldid=871146
- https://fr.wikiversity.org/w/index.php?title=Utilisateur:Solstag/Mod%C3%A9lisation_des_R%C3%A9seaux_(M1_SIREN,_2022)/Activit%C3%A9_A&oldid=871160
- And their diff:
- https://fr.wikiversity.org/w/index.php?title=Utilisateur:Solstag/Mod%C3%A9lisation_des_R%C3%A9seaux_(M1_SIREN,_2022)/Activit%C3%A9_A&type=revision&diff=871160&oldid=871146&diffmode=source
What happens?:
Start-of-line whitespace creates pre-tag formatting inside pre-tag, for some combination of whether a newline is present before <pre> or after </pre>, and behavior is dependent on view, since editing or previewing won't show the nested pre-tag formatting, only the final saved page.
What should have happened instead?:
Pre-tags should output no such formatting, or at least this should be consistent between visual editor, preview, and saved page.
This is particularly bad with the VisualEditor since one does not see the effect while editing and cannot easily insert the newlines needed before/after <pre> to avoid the saved page showing nesting of pre-tag formatting.
