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: | 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 , 18 years ago
Owner: | changed from | to
---|---|
Severity: | normal → minor |
comment:2 by , 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 , 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?
follow-up: 5 comment:4 by , 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.
comment:5 by , 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 , 18 years ago
#4689 marked as duplicate.
See also trac-dev:741 which also discusses this topic.
comment:8 by , 14 years ago
Keywords: | inlinemarkup added |
---|---|
Milestone: | triaging → 0.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 , 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).
follow-up: 11 comment:10 by , 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."
comment:11 by , 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 , 14 years ago
Milestone: | 0.13 → 0.14-wikiengine |
---|
comment:13 by , 9 years ago
Owner: | removed |
---|
comment:14 by , 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 , 9 years ago
Workaround is to use [[html(!)]]
.
'''testing[[html(!)]]''' ||header1||header2|| ||let me exclaim my stuff[[html(!)]]||Another cell||
comment:16 by , 9 years ago
Nice solution . The wysiwyg designer dont resolve html tags but nerver mind the result looks good.
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.