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
Indentation of first line of content
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:
somefile
Example for indentation<host>localhost</host> <port>2812</port>
--SwifT (talk) 15:53, 1 January 2015 (UTC)
Issue with syntax highlighing?
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:
/tmp/file1
FileBox 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:
/tmp/file2
FileBox 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)
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:
/tmp/file2
FileBox 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)