Ticket #1003 (closed Bug: fixed)

Opened 14 months ago

Last modified 6 months ago

WikiSyntax - lists and special characters: ;:#*

Reported by: wwalc Owned by:
Priority: Normal Milestone:
Component: Project : MediaWiki+FCKeditor Version:
Keywords: Pending Cc:

Description

;:#* characters have special meaning in lists, thus they must be translated into html entities

Examples: ; item : definition

:#abc :#def :#ghi

* You can also **break lines **like this

Change History

  Changed 12 months ago by Flavien

FYI, tested with revision 954, there is still a problem with definition lists

Example:

;Note:This is an example.

is converted to:

<dl><dt>Note</dt><dd>This is an example.</dd></dl>

Then at each conversion it get worst:

<dl><dt>Note&lt;/dt&gt;</dt><dd>This is an example.&lt;/dd&gt;</dd></dl> 

follow-up: ↓ 3   Changed 12 months ago by wwalc

  • status changed from new to closed
  • resolution set to fixed

Fixed with [965], please check whether this problem still exists.

in reply to: ↑ 2   Changed 12 months ago by Flavien

  • status changed from closed to reopened
  • resolution deleted

Replying to wwalc:

Tested with [966] and it's better but now there is still a problem: at each save a line break or <br> is inserted.

Example:

;Note: This is an example.
* A line with a bullet.

is converted to:

;Note:This is an example.


* A line with a bullet.

Then at each conversion it get worst:

;Note:This is an example.


<br>

* A line with a bullet.

Note: The space between Note: This is removed after the first conversion. It makes apparently no visual differences but will raise error in diffs.

  Changed 12 months ago by ycombarnous

There is the same issue sometimes with li tag. What I did to remove this behavior was to add conditionally the line break in lists:

if (stringBuilder.length > 0 
     && !stringBuilder[ stringBuilder.length - 1 ].EndsWith( '\n' ))
	stringBuilder.push( '\n' ) ;

  Changed 12 months ago by ycombarnous

I think removing BR tags in lists would be sane to (adding _inList like _inPre) could make sense.

  Changed 12 months ago by wwalc

This has been (almost) fixed with [1033] (thanks again for a patch!).

"Almost" because one extra <br> tag is added which will cause diff troubles.

The space between Note: This will be removed (unfortunately) because we lose information about how wiki text is represented. So if there is a couple of ways to represent the same information, we use always one. I believe it can be hard to fix.

Ycombarnous, could you give me an example how to reproduce BR error in <li> tag?

  Changed 8 months ago by w.olchawa

  • keywords Pending added

  Changed 6 months ago by wwalc

  • status changed from reopened to closed
  • resolution set to fixed

Handling lists and special characters (;:#*) improved with [1862] & [1863].

  Changed 6 months ago by wwalc

Related tickets: #1469, #1100.

Note: See TracTickets for help on using tickets.