Help talk:Newlines and spaces
Latest comment: 2 years ago by Lomedhi in topic Prevent non-breaking space replacement in <syntaxhighlight>
Creating a new line...
editI am wondering if any of you guys can help me. I am attempting to use ParserFunctions to create a unit converter for my wiki. The issue is that the "#expr" code is creating a new line after every use. My code is below. Any help would be SOOOOO appreciated! Thanks!!! --Zackmann08 (talk) 22:22, 1 May 2012 (UTC)
The template:
<includeonly>"{{#expr:({{{1}}}* 2.2046)round2}} lbs ({{{1}}} kg)"</includeonly>
The use of the template:
* '''Weight''': {{convert/kg|1}} * '''Weight''': {{convert/kg|2}}
What it produces:
- Weight: "2.2 lbs (1 kg)"
- Weight: "4.41 lbs (2 kg)"
What I WANT it to produce:
- Weight: "2.2 lbs (1 kg)"
- Weight: "4.41 lbs (2 kg)"
Prevent non-breaking space replacement in <syntaxhighlight>
editIs there a way to prevent a space before a percent symbol from being replaced by a non-breaking space in a <syntaxhighlight> block? I want to be able to copy the code block and paste it into a config file, and non-breaking spaces are causing issues. Lomedhi (talk) 18:37, 18 November 2022 (UTC)