#Template: Span Issue

36 messages · Page 1 of 1 (latest)

burnt shoal
#

Hi, I'm a new wiki admin and new wiki editor in general.
I've recently created a template that allows me to specify a custom text color in any position, that being:

<includeonly><span style="color:{{{1}}};">{{{2}}}</span></includeonly>

However, when using said template, anything after this template on the same line will be wrapped in a codeblock. For example, the text in the first image turns into the garbled mess in the second image.
Is there something wrong with the template or the text in the first image? Any tips or clues would be much appreciated!

#

Additional information:
If I apply the span element directly on the page, the page appears as intended without any codeblocks.
Multiple uses of this template directly after one another are applied correctly, but if there is any normal text after the last instance of the template it will be shown in a codeblock like in the second image above.
If I remove the space between the end of the template and the next word, like so:

** '''Tap notes''' - {{CustomTextColor|#f832a5|pink}}circular notes that require the player to tap the corresponding button or touch sensor zone as the note overlaps with the judgment line.

the text appears fine, but still appears on a new line instead of as part of the same line.

solar quest
#

can you please link template page?

#

to post links here you should /auth w/ our bot tho

burnt shoal
#

Alright, let me do so real quick.

solar quest
#

possibly stray row break + unclosed noinclude tag, I fixed that

#

as for code blocks - it usually happens if you leave a space break right at the beginning of the row

#

like this

burnt shoal
#

I see. For future reference, may I know where the stray row break was? In the template or the page?

#

Looking back at the page history I see the unclosed </noinclude>, but I don't see a row break anywhere.
Also just curious if noinclude being unclosed would be an issue if there is nothing else to be included in the template in the rest of the page.

#

And of course thank you for the help! The issue has indeed been fixed.

solar quest
#

every tag must be closed (except for <br> cus it's special lol)

#

what I meant is between </includeonly> and <noinclude>

burnt shoal
#

I see, but how does a row break outside of the <includeonly> tags affect the template itself?

jagged tree
#

Put {{DISPLAYTITLE: maimai}} and {{MaimaiSelector}} right after each other on the same line (since the former don't output actual content text, the parser essentially see it as an empty line in that respect I think)

solar quest
#

we always have to consider this in templates

jagged tree
#

But yeah sometimes it can be a pain to find those stray linebreaks creating empty paragraphs sometimes xD

burnt shoal
#

This template also has a row break between the </includeonly> and the following <noinclude> tag, yet so far (according to the examples in the same page at least) there seems to be no issue (yet).

burnt shoal
#

And doubly worse because there is no syntax highlighting, so any stray tag, even a missing closing >, is going to take years to find on a large page 😅

jagged tree
solar quest
#

marker icon in editor

burnt shoal
burnt shoal
#

To think I have been essentially coding on Notepad all this while 🤦‍♀️

jagged tree
#

Ohh yeah seems it is enabled already enabled just turned off by default? odd.
That said for future reference in general most extensions can just be enabled by going to "View this wiki's extensions" in the sidebar, and then just search for them there and well put a tick and save. There are a few exceptions to that, but those are rare

burnt shoal
solar quest
#

yeah it's enabled by default

#

just needs to turned on in editor by user

burnt shoal
#

Though is it only enabled for the new wikitext editor? I opted into it in the Preferences > Beta Options menu.

solar quest
#

beta is Visual Editor tho?
by default you have Source Editor

burnt shoal
#

Oh I meant whatever this editor is.