Template talk:KernelBox

From Gentoo Wiki
Jump to: navigation, search
Note
This is a talk page. Please add newer comments below older ones, and sign your comments using four tildes (~~~~). When adding a new section (at the bottom of the page), please mark it as "open for discussion" by using {{talk|open}} so it will show up in the list of open discussions.

Indentation of first line of content

Talk status
This discussion is done.

KernelBox template with 1= ignores indentation for the first line of content. For example the following KernelBox with 1= and 4 spaces of indentation for each line;

{{KernelBox|1=
    Some kernel options.
    More kernel options.    
}}

will display as:

KERNEL
Some kernel options.
    More kernel options.

Is this a bug in the template? --BT (talk) 10:56, 30 May 2017 (UTC)

Hmm... It would seem that trim is being called on whitespace at the beginning and the ends of the line automatically on parameters passed to templates. I can look into this further to see if there a work around that's more consistent than using <pre> tags for formatting. --Maffblaster (talk) 12:34, 30 May 2017 (UTC)

I completely forgot that I raised the same issue a couple years ago against the FileBox template. See the talk page Template_talk:FileBox. The correct way to preserve the indent on the first line is to use:

{{KernelBox|1=<nowiki />
    Some kernel options.
    More kernel options.
}}

which display as:

KERNEL
    Some kernel options.
    More kernel options.

This is only necessary if the first line has an indent, otherwise using 1= is sufficient. It also preserves syntax highlighting for FileBox. --BT (talk) 07:44, 3 June 2017 (UTC)

1= causes highlighting errors

Talk status
This discussion is still ongoing as of September 21, 2017.

Using the 1= parameter (e.g. this edit) causes the article to be added to category Pages with syntax highlighting errors. --Charles17 (talk) 07:01, 21 September 2017 (UTC)

This is happening all over the place for me too, even for very simple examples (e.g., please see the FileBox talk page). --Sakaki (talk) 09:13, 21 September 2017 (UTC)

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:08, 21 September 2017 (UTC)

Usage of KernelBox

Talk status
This discussion is still ongoing.

Isn't it better to provide path instead of using {{KernelBox}} ? Based on my experience it's very missleading. I would prefer to use this version instead https://imgur.com/a/emX22W2 in one line of text with "some" formatting to differenciate it for end-user.

Possibly like? {{KernelBox| Device Drivers -> Multimedia support -> Media Controller API (MEDIA_CONTROLLER [=y])}}

KERNEL
Device Drivers -> Multimedia support -> Media Controller API (MEDIA_CONTROLLER)

NOTE: won't display with `[=y]` parameter. --Kreyren (talk) 03:09, 29 August 2018 (UTC)

Discussion:

Long time ago only was discussion about do write an extension for mediawiki to show setting for different versions of kernel. And maybe also do show in config mode like
.config
CONFIG_BLA=y
CONFIG_BLA_DEV=m
If you able for this, please do it. --Cronolio (talk) 05:54, 29 August 2018 (UTC)

--Kreyren (talk) 13:25, 3 September 2018 (UTC)

Shouldn't be an issue, but i need the permission from gentoo dev.