Home » Discussões » 150
Automated indentation in [code] tags
submitted by lammi87, 14:43, 21 Agosto 2012
TÓPICO: other
STATUS: opened
PRIORIDADE: low
Descrição:

Hi, this is lammi87.

Should [code] tags automatically use indentation? I think it would look nice especially on pages which have a lot of text.

What do you think? Which looks better?

1 text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text

some code

text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text

or

2 text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text

     some code

text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text

Ofcourse one can use the new [tab] tags when they are available like this:

[tab]
[code]
[/code]
[/tab]

but should they be "included" to the [code] tags?

Mensagens:
tonicucoz:
The [code] tag is a simple <pre></pre> HTML tag, so it keeps the tabs. I prefer the first option, without another tab automatically added. Anyway we can choose to add a tab
submitted by tonicucoz, 10:25, 22 Agosto 2012
lammi87:

Do you mean that you are going to change the [code] tags? I think they make the layout much clearer with automated indentation. Have a look of these two pages: page1 page2. They use a small indentation and it makes reading the content much easier. We don't have to use a full tab. A few spaces would be enough, like this (here I used three):

text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text

   some code

text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text

I edited one of our wiki pages and removed manual indentation from [code] tags. Do you prefer the old version or the new one? If you prefer the old one, then we should include automated indentation to code tags. It would give our wiki much clearer and unified layout. People tend to include some indentation to [code] tags but the amount varies depending on the users preferences. The result is a bit mixed up layout (as you can see from the old version of the wiki page).

submitted by lammi87, 12:08, 22 Agosto 2012
greenman:
I actually prefer the new one :)
submitted by greenman, 18:22, 28 Julho 2016

Write below your motivation

h-node.org is a hardware database project. It runs the h-source PHP software, commit cdeda15, available under the GNU General Public (GPLv3) License.
JavaScript license information