Wiki on a Stick Official Forums

A personal wiki living in a self-modifying XHTML file

You are not logged in.

#1 22-01-2010 15:41:04

FBnil
WoaS typist
Registered: 13-11-2009
Posts: 141

Continue on new line

We have \ to mark a continuation:

This is \
the same line

In a list, in order to not break it, like this:

@ one
@ two
an even number
@ one

To continue the same list, we have two options: use blockquote:

@ one
@ two \
<blockquote>an even number</blockquote>
@ three

or use line continuation with a <br>

@ one
@ two <br>\
b
@ three

Back to the blockquote. You cannot have newlines inside the blockquote, so we write:

@ one
@ two \
<blockquote> \
an even number <br>\
second line \
</blockquote>
@ three



I propose a double \\ at the end of the line that will eat the newline and replace it by <br>
(effectively "\\" is "<br>\" )

related note: If you want to write C:\dir\ then just add a space at the end of the line so the \ doesnt trigger. You can also use an empty remark: <!-- -->

Offline

 

#2 22-01-2010 17:21:26

Little Girl
Moderator
Registered: 26-07-2009
Posts: 254
Website

Re: Continue on new line

I like the direction this suggestion is taking, but I have a counter-proposal. How about if \\ is just <br> instead? I've long wanted a wiki markup for <br>, and would like to see it on its own rather than combined with a line join. This would make it a bit more versatile. I'll use these two examples you gave:

@ one
@ two <br>\
b
@ three

@ one
@ two \
<blockquote> \
an even number <br>\
second line \
</blockquote>
@ three

They could be done this way instead:

@ one
@ two\
\\b
@ three


@ one
@ two \
<blockquote> \
an even number\
\\second line \
</blockquote>
@ three

That way if you have a short entry, you could put it on one line. For example, this:

one<br>
two<br>
three<br>
four

Becomes this:

one\\two\\three\\four

Rather than this:

one\\
two\\
three\\
four

If \\ were <br>\, then putting them on one line would insert extraneous slashes into the result.

My two cents. smile


There is no spoon.

Offline

 

#3 23-01-2010 01:07:19

legolas558
Administrator
From: Rome
Registered: 05-07-2007
Posts: 544

Re: Continue on new line

why the default syntax behaviour needs to be changed?

Offline

 

#4 24-01-2010 03:44:35

Little Girl
Moderator
Registered: 26-07-2009
Posts: 254
Website

Re: Continue on new line

It doesn't, since there's no current wiki syntax for <br> tags. He's adding syntax for <br>\, but I'd rather have the syntax be for just plain <br> so we can add the existing \ markup only when needed.


There is no spoon.

Offline

 

#5 24-01-2010 20:28:37

FBnil
WoaS typist
Registered: 13-11-2009
Posts: 141

Re: Continue on new line

Hmm, ok let me explain again.

This exists already:
"\" removes the \n

This is what I propose to add:
"\\" removes the \n and replaces it by <br>

This frees <blockquote> from being used for indentation after a list item (and to prevent the listcounter from starting from 1 again)

# one
# two \\
This is the description after two\\
and even another line
# three

and displays like:

1. one
2. two
    This is the description after two
    and even another line
3. three

Combined with the indentation ":" wiki markup you can indent them even more.

Now, to test how it would look like, you can use "<br>\" for now.

Last edited by FBnil (24-01-2010 20:34:47)

Offline

 

#6 29-01-2010 00:08:00

Little Girl
Moderator
Registered: 26-07-2009
Posts: 254
Website

Re: Continue on new line

Got it. I didn't see why it was necessary to add the \ to the <br> until I saw it working in your enhancement version and tried it both ways. Love it the way you did it. smile


There is no spoon.

Offline

 

#7 29-01-2010 07:34:39

legolas558
Administrator
From: Rome
Registered: 05-07-2007
Posts: 544

Re: Continue on new line

thank you fbnil, perfect example, I got it

I think the parser should do the same without any ending character, by just looking at the indentation that the user typed, e.g.:

Code:

# first item
# second item
   description of the second item
#   third item
     description of the third item
# fourth item

But I'd first check out how they did it in WikiCreole

Offline

 

Board footer

Copyright © WoaS Project 2007~2010