#12999 closed defect (fixed)
Quoting CamelCase links fails w/ digits in word
Reported by: | Owned by: | Jun Omae | |
---|---|---|---|
Priority: | normal | Component: | TracWysiwygPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 1.0 |
Description
Typing InPos1
in the wysiwyg-editor with auto-link off results in !InPos1
which is then displayed as !InPos1 - as one can see here in this Trac install as well.
I see a list of regular expressions in the Javascript code but unfortunately I fail to see a possible fix.
Attachments (2)
Change History (8)
Changed 8 years ago by
Attachment: | t12999-workforme.png added |
---|
comment:1 Changed 8 years ago by
comment:2 Changed 8 years ago by
Okay. I understand. That means wiki formatter in wysiwyg.js is inconsistent with wiki formatter in Trac core for InPos1
.
Please try the following patch:
-
tracwysiwyg/htdocs/wysiwyg.js
1393 1393 var _tracLink = _linkScheme + ":(?:" + _quotedString 1394 1394 + "|[a-zA-Z0-9/?!#@](?:(?:\\|(?=[^| \\t\\r\\f\\v])|[^|<> \\t\\r\\f\\v])*[a-zA-Z0-9/=])?)"; 1395 1395 var _wikiPageName = "[A-Z][a-z]+(?:[A-Z][a-z]*[a-z/])+(?:#[\\w:][-\\w\\d.:]*)?" 1396 + "(?=:(?:$|[ \\t\\r\\f\\v])|[^: a-zA-Z]|[ \\t\\r\\f\\v]|$)";1396 + "(?=:(?:$|[ \\t\\r\\f\\v])|[^:\\wa-zA-Z]|[ \\t\\r\\f\\v]|$)"; 1397 1397 var wikiInlineRules = []; 1398 1398 wikiInlineRules.push("!?'''''"); // 1. bolditalic 1399 1399 wikiInlineRules.push("!?'''"); // 2. bold
Changed 8 years ago by
Attachment: | t12999-fix-unicode-camelcase.diff added |
---|
comment:3 Changed 8 years ago by
Status: | new → accepted |
---|
This issue is same as trac:r9984.
Also, unicode camel case doesn't link in wysiwyg.js (same as trac:#230). Patch: t12999-fix-unicode-camelcase.diff.
comment:4 Changed 8 years ago by
Thank you for the quick response!
Question: Is it better to patch or are you planning to commit a new revision to https://trac-hacks.org/browser/tracwysiwygplugin/0.12 any time soon?
comment:6 Changed 8 years ago by
Pushed the patch to tracwysiwygplugin/0.12 branch. Thanks for the reporting!
It cannot be reproduced. Works for me.