General wiki rules

Arran Cudbard-Bell a.cudbardb at freeradius.org
Fri Jul 15 11:59:02 CEST 2011


On Jul 15, 2011, at 10:30 AM, Alexander Clouter wrote:

> Arran Cudbard-Bell <a.cudbardb at freeradius.org> wrote:
>> 
>> There is no better alternative. You need to indent code blocks for 
>> them to be easily legible, as it breaks them out of the normal flow of 
>> the document.
>> 
> I think that's Phil's point.  The code he is cutting and pasting in is 
> no doubt already indented.  However, what it probably has is either:
> * no initial indentation (start <tab> or <space>)
> * that indential probably is a <tab> rather than <space><space>

Hmm re-reading the RST spec it seems that any indentation will work (i.e. one space before each line, or one tab).

"To just include a chunk of preformatted, never-to-be-fiddled-with text, finish the prior paragraph with "::". The preformatted block is finished when the text falls back to the same indentation level as a paragraph prior to the preformatted block. For example:

An example::

    Whitespace, newlines, blank lines, and all kinds of markup
      (like *this* or \this) is preserved by literal blocks.
  Lookie here, I've dropped an indentation level
  (but not far enough)

no more example"

Is that any better? I mean you don't *have* to edit the wiki page in situ, usually I copy the text out of the webpage into BBEdit the paste it back... 

What we could do for the very active Git savy contributors would be to enable commit access to the wiki's repo, then you could work on the documents in gvim, vim, emacs... whatever at which point indenting blocks of code becomes very easy.

Also lets you work on pages offline.


> 
> I love dokuwiki for documentation, but it is a right ballache to find 
> that when you cut and paste in your configuration snippet I *then* have 
> to go through <space><space><home><down-cursor><goto 10> before it is 
> usable.
> 
> Sure it seems not a biggy, but it is a right turnoff and makes us all 
> less inclinded to put in the effort.
> 
>> If it's going to be a huge issue I could probably add something to 
>> gollum which converts <pre> tags into the appropriate white space 
>> scheme before committing the text to the repository. Would you still 
>> have an issue with this?
>> 	
> That would be pretty schweet.  I would not 'pre-process' the text, I 
> would make sure those <pre>/{{{/whatever remains intact so you do not 
> suffer indentation pain when editing existing content.

But that'd mean i'd have to do the reverse when displaying the src, and I actually like viewing the src with indented code blocks compared to <pre> tags *sigh*.

I could add a javascript function mapped to a key combo, that indents selected lines by one tab (more universal than spaces)?

-Arran

Arran Cudbard-Bell
a.cudbardb at freeradius.org

RADIUS - Half the complexity of Diameter





More information about the Freeradius-Users mailing list