Edgewall Software
Modify

Opened 18 years ago

Last modified 9 years ago

#3970 new defect

Wiki parsing error when using exclamation at the end of phrase

Reported by: sid@… Owned by:
Priority: normal Milestone: topic-wikiengine
Component: wiki system Version: 0.10
Severity: minor Keywords: inlinemarkup
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

When using this bold text:

'''testing!'''

I see this:

testing'''

It also happens with italics:

testing''

Attachments (0)

Change History (16)

comment:1 by Christian Boos, 18 years ago

Owner: changed from Jonas Borgström to Christian Boos
Severity: normalminor

Yep, that's a duplicate of #3539.

Though we closed that one, saying it's a documented limitation.

As I'm currently considering an rework of the wiki engine, I'll look into a way to avoid this limitation, so maybe this could get fixed after all.

comment:2 by anonymous, 18 years ago

Agreed that this is not a big issue, but it does seem to be common to end a sentence that you've bolded with an exclamation point.

comment:3 by Christian Boos, 18 years ago

Milestone: 2.0

A future version of the wiki could use a different escape character, something not used in normal punctuation.

Maybe something which is also not frequently used in programming languages as well ;)

What about taking "\" as the character for escaping wiki markup?

comment:4 by sid, 18 years ago

I think this one is more headache than it is worth. The workaround is documented in WikiFormatting#FontStyles and changing the escape character means rewriting your current Wiki documents. I now agree that this is a dupe of #3539 and am okay closing it as such.

in reply to:  4 comment:5 by Emmanuel Blot, 18 years ago

Replying to sid:

I think this one is more headache than it is worth.

Agreed. A tricky case would be the use of such a character in a commit message, for example. This could lead to weird issue.

"^" might be a better replacement, as it is not used in common language, while already being known as an escape character (DOS, VIm, …)

It is used as the superscript modifier, though. However, as subsscript modifier use a double ",", it would make sense to change the superscript modifier to a double "^"

comment:6 by Christian Boos, 18 years ago

#4689 marked as duplicate.

See also trac-dev:741 which also discusses this topic.

comment:7 by Christian Boos, 15 years ago

Milestone: 2.0unscheduled

Milestone 2.0 deleted

comment:8 by Christian Boos, 14 years ago

Keywords: inlinemarkup added
Milestone: triaging0.13

I'll keep that one visible while working on the new WikiEngine, but I'm not 100% confident to find a fix.

comment:9 by Christian Boos, 14 years ago

#9639 was closed as duplicate as this one (suggesting to use !! for quoting ! itself, which might be a good idea if we can't find a reliable way to handle that in the parser).

comment:10 by shesek, 14 years ago

I don't think there can be a reliable way to handle that. How would it know if //foo!// should be italic 'foo!' or the '!' should escape the closing //?

As I said in comment:2:ticket:9639 - "doubling the character is the approach taken in most places (PHP, SQL [either double \\ in some DBMS or double '' in others] and most places dealing with escape character), so I think its reasonable to use it."

in reply to:  10 comment:11 by Christian Boos, 14 years ago

Replying to shesek:

I don't think there can be a reliable way to handle that. How would it know if //foo!// should be italic 'foo!' or the '!' should escape the closing //?

According to the content of the rest of the line:

//foo!// that other content//

(⇒ escape)

//foo!// that other //content//

(⇒ don't escape)

But I've no idea yet if that can be made robust.

As I said in comment:2:ticket:9639 - "doubling the character is the approach taken in most places (PHP, SQL [either double \\ in some DBMS or double '' in others] and most places dealing with escape character), so I think its reasonable to use it."

If you follow the link in comment:6, you can see I advocated this approach myself a couple of years back ;-)

But instead of the overly general "(?P<escape>!!)" I originally proposed, I wonder if instead we couldn't change each of our standard escape sequence to take care of escaping the escape, e.g. replace "(?P<linebreak_wc>!?\\\\)" with "(?P<linebreak_wc>!{,2}\\\\)" (or !?!?, whichever form is faster). And in the forthcoming new WikiEngine, maybe even group the escapable patterns together in order to not have to repeat this regexp fragment.

comment:12 by Christian Boos, 14 years ago

Milestone: 0.130.14-wikiengine

comment:13 by Ryan J Ollos, 9 years ago

Owner: Christian Boos removed

comment:14 by kai19Chan@…, 9 years ago

After spend too mutch time in reading tickets I want to show my "works 4 me, but i dont like it" way.

Problem: '!' at the end of a cell in a trac table

header1 header2
let me exclaim my stuff! Another cell

After leave the textarea view (change to wysiwyg ) '!' hides the space behind, so both cells are in one let me exclaim my stuff|| Another cell. After commiting it's clear my wiki post is corupted.

dirty workarround

header1 header2
let me exclaim my stuff! Another cell

If someone has a better solution. Please write a comment.

comment:15 by Jun Omae, 9 years ago

Workaround is to use [[html(!)]].

'''testing[[html(!)]]'''

||header1||header2||
||let me exclaim my stuff[[html(!)]]||Another cell||

comment:16 by Kai <kai19chan@…>, 9 years ago

Nice solution . The wysiwyg designer dont resolve html tags but nerver mind the result looks good.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.