I thought it would be helpful to have all ideas about TextFormattingRules in one place. - YishayMor

Yes, and that page has traditionally been called WikiMarkupDevelopment :-). --JanneJalkanen

12/08/03 - general escape character

Is there something like this? We could use the tilde in avery occurance, where the following char is not to be interpret, not in text and not in links. - BobSchulze

Tilde (~) is the general escape character, but unfortunately it does not yet work in many places. This is a clear problem, and should really be put on the TODOList... --JanneJalkanen

12/06/03 - editor comments - YishayMor

Any formating / programming language I know has a "comment" construct, i.e., a way of adding text which will be ignored by the compiler. Now, why would I want this in a Wiki? Well, here's a couple of use cases:
  • We're thinking of adding forms for automating common tasks. E.g.: upload an image and link to it, add a "blog entry", etc. These forms would basicaly add some text to the page, so that you can allways hack the result if you don't like it. However, I would like to mark it, as in "<!-- begin blogEntry -->"
  • I have some outline of a page I'm working on, which I want to save, but not publish.

09/06/03 - non-breakin line break - YishayMor

JSPWiki relies heavily on new lines in its parsing. Generaly, this is good. But sometimes, you'd like it to ignore a newline.

If I want "mary had a little lamb" in a box, as in:

Mary had a little lamb
Little lamb
Little lamb

I might prefer to write:

| Mary had a little lamb \\
  Little lamb \\
  Little lamb \\
|
but that would come out as:
Mary had a little lamb
Little lamb
Little lamb

I could, of course, do:

| Mary had a little lamb \\  Little lamb \\  Little lamb \\ |

but its less readable...

It would be nice if I could direct the parser to ignore the new line, like:

| Mary had a little lamb \\ !->
  Little lamb \\ !->
  Little lamb \\ !->
|

- YishayMor

09/06/03 - embedded structures - YishayMor

Currently, I don't see any way of generating something like
1. Hunting snarks
   * why hunt snarks?
   * where are they?
2. building castles in the air
   * sand castles
   * cloud castles

Doing this

# Hunting snarks
* why hunt snarks?
* where are they?
# building castles in the air
* sand castles
* cloud castles
generates this:
  1. Hunting snarks
  • why hunt snarks?
  • where are they?
  1. building castles in the air
  • sand castles
  • cloud castles

I, too, would like these features, Yishay. For the structures, though, I think this syntax would be better:

# Hunting snarks
#* why hunt snarks?
#* where are they?
# building castles in the air
#* sand castles
#* cloud castles
This clearly, in my warped little brain, could tell the parser that the indented bulleted list is part of the numbered list. Comments? Janne?
--MichaelGentry

Actually, the syntax is supposed to be

# Hunting snarks
** why hunt snarks?
** where are they?
# building castles in the air
** sand castles
** cloud castles
but unfortunately there is a known bug with JSPWiki getting confused about the whole thing. There are even tests for that sort of thing in the current distribution, though they are commented out.

(BTW, this is the way that PHPWiki does it, and I think we should stick to that convention. The less there are different formatting styles, the better.)

--JanneJalkanen

Janne, I still think that if:

# Hi, I'm "1"
## Hi, I'm "1.1"
# Hi, I'm "2"
Produces:
  1. Hi, I'm "1"
    1. Hi, I'm "1.1"
  2. Hi, I'm "2"
Then:
# Hi, I'm "1"
#* Hi, I'm a bullet under "1"
# Hi, I'm "2"
Would produce the desired results (once implemented, of course). There is already logic in the engine to look after the first "#" to see if there is another "#" so it'll know to create a nested ordered list (<OL>) section. Why not have it look to see if there is a "*" after the "#" and, if so, create a nested unordered list (<UL>) section? Seems intuitive to me (and easier to implement). You'll just have to keep up with which type of list it is to emit the proper closing tag (the <LI> tags won't change at all, of course), but that logic might already be in the engine (haven't looked at the code for it yet).

--MichaelGentry

I made an implementation of this recently (based on 2.0.50 base), seems to work well.

# Hunting snarks
#* why hunt snarks?
#* where are they?
# building castles in the air
#* sand castles
#* cloud castles
comes out looking something like
1. Hunting snarks
    . why hunt snarks?
    . where are they?
2. building castles in the air
    . sand castles
    . cloud castles
More involved examples also work.

I'll post the appropriate changes if anyone is interested.

--MurrayG

I tweaked my implementation and now

# Hunting snarks
** why hunt snarks?
** where are they?
# building castles in the air
** sand castles
** cloud castles
also produces the same result.

Use your prefered variation, the key is the last character and the depth. If deeper then a nested list is started, if the same then continued, if same but different ending then the previous is closed and a new opened (i.e. changing from # to * or vice-versa). Moving to a lower level just continues that level where it left off.

--MurrayG

This works for me (JSPWiki v2.0.52)

# Hunting snarks \\
 * why hunt snarks? \\
 * where are they? \\
# building castles in the air \\
 * sand castles \\
 * cloud castles \\
-- Amir

Add new attachment

In order to upload a new attachment to this page, please use the following box to find the file, then click on “Upload”.
« This page (revision-20) was last changed on 04-Apr-2005 11:14 by 81.144.173.238 [RSS]