[dokuwiki] Re: Is there any way to turn off 'indent by two spaces' being a code block?

  • From: Chris Green <cl@xxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Tue, 19 Jun 2012 17:51:26 +0100

On Tue, Jun 19, 2012 at 05:37:14PM +0100, Christopher Smith wrote:
> 
> On 19 Jun 2012, at 13:42, Chris Green wrote:
> 
> > Subject says it all really, I want to be able to have multiple spaces at
> > the start of a line without DokuWiki interpreting it as a code block. 
> > 
> > I have a stylesheet which has:-
> > 
> >  white-space: pre;
> >  font-family: monospace;
> > 
> > and I want to be able to manually lay out some text.
> > 
> > Is there any sort of space (shifted space for example) or other
> > non-printing character that will prevent DokuWiki seeing a space as the
> > first character of the line?
> > 
> > -- 
> > Chris Green
> > -- 
> > DokuWiki mailing list - more info at
> > http://www.dokuwiki.org/mailinglist
> 
> 
> <nowiki> http://www.dokuwiki.org/syntax#no_formatting
> 
> Two spaces isn't really code, as in it gets no syntax highlighting, its 
> wrapped in <pre> and given a monospace font.
> 
> Rather than fighting against DokuWiki, work with it: give all your lines two 
> spaces at the start.
> 
That doesn't do what I want for a number of reasons:-

    I can't put any other DokuWiki syntax into the unformatted text.
        What I want is a document where spaces and new-lines are as I type them
        into the text but everything else is standard DokuWiki (in particular I
        want to be able to put DokuWiki links into the text)

    It changes the background colour and puts a dashed box around the text.

    It wastes two spaces at the LHS.


I have just about managed what I want now by using a plugin to create a
<div> block with a class that causes the stylesheet above to be used.
Then, to prevent initial spaces from making DokuWiki changing the mode I
use a nobreakspace as the first character of the line (this was a
little more difficult than it might have been, I had to use xmodmap to
change the keyboard layout to send a nobreakspace).

-- 
Chris Green
-- 
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: