This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

Template talk:FileBox

From Gentoo Wiki (test)
Jump to:navigation Jump to:search

Indentation of first line of content

Talk status
This discussion is done.

This template doesn't appear to preserve indentation (spaces) for the first line of content. For example, the contents of the FileBox templates at MediaTomb#MySQL are all indented. The indent is only preserved for second and subsequent lines of content. I can preserve the indents if I wrap the content with <nowiki></nowiki>, but I then loose syntax highlighting. Is this expected behavior or am I missing something? --BT (talk) 15:48, 1 January 2015 (UTC)

Try just setting <nowiki />, like so:
FILE somefileExample for indentation
    <host>localhost</host>
    <port>2812</port>

--SwifT (talk) 15:53, 1 January 2015 (UTC)

That did it. Thank you. --BT (talk) 15:57, 1 January 2015 (UTC)

Issue with syntax highlighing?

Talk status
This discussion is done.

Hi, has something changed recently with this syntax handling in this template?

If I try the given example text:

{{FileBox|title=FileBox example 1|filename=/tmp/file1|lang=bash|1=
#!/bin/bash
echo "Hello, world!" 
}}

it works OK:

FILE /tmp/file1FileBox example 1
#!/bin/bash
echo "Hello, world!"

But, if I add another line to the file, so:

{{FileBox|title=FileBox example 2|filename=/tmp/file2|lang=bash|1=
#!/bin/bash
echo "Hello, world!" 
echo "Goodbye, world!" 
}}

the highlighting goes away, and the page gets added to the "Pages with syntax highlighting errors" category:

FILE /tmp/file2FileBox example 2
#!/bin/bash
echo "Hello, world!" 
echo "Goodbye, world!"

I have found also that existing complex FileBox bash examples in my EFI guide (e.g. ebuilds) display OK, but if I edit them (even to add comment lines), the syntax highlighting drops out.

I'm sure I'm doing something dumb here, please help! --Sakaki (talk) 17:25, 19 August 2017 (UTC)

Cache magic or something... --Cronolio (talk) 19:04, 19 August 2017 (UTC)
Thanks, whatever magic you did, it seems to have fixed it! --Sakaki (talk) 11:16, 20 August 2017 (UTC)
Actually, it is still not working properly on my actual wiki pages (see e.g. here); presumably this something that will just take some time to flow through? --Sakaki (talk) 11:50, 20 August 2017 (UTC)
Looks like syntaxhighlight is broken now. This is simple example
#!/bin/bash
echo "Hello, world!" 
echo "Goodbye, world!"
So this question for gentoo infra --Cronolio (talk) 18:58, 20 August 2017 (UTC)

Another failing test (for bug report):

{{FileBox|title=FileBox example 2|filename=/tmp/file2|lang=bash|1=
#!/bin/bash
echo "Hello, world!" 
echo "Farewell, world!" 
}}

gives:

FILE /tmp/file2FileBox example 2
#!/bin/bash
echo "Hello, world!" 
echo "Farewell, world!"

--Sakaki (talk) 11:57, 21 August 2017 (UTC)

Hi Sakaki , Cronolio , and everyone. At first glance seems to be something happening on the wiki's backend, but I haven't looked too closely yet. I've been needing to do updates to wiki extensions for a while now which I will try hard to get some performed this weekend (Friday/Saturday). Please use proper KernelBox syntax even with the 'Pages with syntax highlighting errors' message displaying. This is proper syntax even if wiki is warning about it. I'll add a message to the front page of the wiki once I get things updated. Kind regards, --Maffblaster (talk) 17:10, 21 September 2017 (UTC)

Hi Matthew Marchese (Maffblaster) , I was just wondering if there was any progress on this, or some workaround that can be adopted? The list of pages with syntax highlighting errors seems to have grown quite large now ^-^ Kind regards, --Sakaki (talk) 14:21, 16 November 2017 (UTC)
Highlighting looks like it's working now. --Grknight (talk) 02:13, 8 November 2018 (UTC)