Loading...
 
Skip to main content

Syntax structures including ":" and color syntax doesn't work within a definition term (parser bug)

Status
Open
Subject
Syntax structures including ":" and color syntax doesn't work within a definition term (parser bug)
Version
2.x
3.x
Category
  • Error
Feature
Wiki Syntax (text area, parser, external wiki, etc)
Submitted by
lbmaian
Lastmod by
lbmaian
Rating
(0)
Description

Syntax that should work inside a description term (the x in ";x:y") don't. This includes anything in a ':' in it even if it's nested within another syntax structure like a link or table. In a link, it's especially bad, since you can't use ~np~ to fix it, e.g. you can't fix ((a:b)). Also, ~~color:x~~ doesn't work.

!!!;a:text
;a:text
works
%%%%%%%%%%%%
!!!;~~red:a~~:text
;~~red:a~~:text
looks like ;a:text
%%%%%%%%%%%%
!!!;((a)):text
;((a)):text
works
%%%%%%%%%%%%
!!!;((a:b)):text
;((a:b)):text
looks like ;a:((a:b|b)):text
%%%%%%%%%%%%
!!!;((a|b:c)):text
;((a|b:c)):text
looks like ;b:((a|c)):text
%%%%%%%%%%%%
!!!;((a|b:c)):text
;((a|b:c)):text
works
%%%%%%%%%%%%
!!!;__a__:text
;__a__:text
works
%%%%%%%%%%%%
!!!;||a||:text
;||a||:text
works
%%%%%%%%%%%%
!!!;||a:b||:text
;||a:b||:text
this just looks strange


I looked in the parser code, and it's pretty obvious why these bugs occur. The parser code, to put it bluntly, sucks. It uses regexps for most parsing instead of a proper context-free parser, so it's bound to have these types of bugs.

Workaround
Using ~np~ can work around some issues, but it can't be used when ':' is required in the syntax.
Priority
25
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
2496
Created
Saturday 09 May, 2009 19:50:46 UTC
by Unknown
LastModif
Wednesday 20 May, 2009 13:29:07 UTC


Show PHP error messages