Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#12999 closed defect (fixed)

Quoting CamelCase links fails w/ digits in word

Reported by: fls@… Owned by: Jun Omae
Priority: normal Component: TracWysiwygPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0


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)

t12999-workforme.png (18.0 KB) - added by Jun Omae 6 years ago.
t12999-fix-unicode-camelcase.diff (18.0 KB) - added by Jun Omae 6 years ago.

Download all attachments as: .zip

Change History (8)

Changed 6 years ago by Jun Omae

Attachment: t12999-workforme.png added

comment:1 Changed 6 years ago by Jun Omae

It cannot be reproduced. Works for me.

comment:2 Changed 6 years ago by Jun Omae

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

    13931393    var _tracLink = _linkScheme + ":(?:" + _quotedString
    13941394        + "|[a-zA-Z0-9/?!#@](?:(?:\\|(?=[^| \\t\\r\\f\\v])|[^|<> \\t\\r\\f\\v])*[a-zA-Z0-9/=])?)";
    13951395    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]|$)";
    13971397    var wikiInlineRules = [];
    13981398    wikiInlineRules.push("!?'''''");        // 1. bolditalic
    13991399    wikiInlineRules.push("!?'''");          // 2. bold

Changed 6 years ago by Jun Omae

comment:3 Changed 6 years ago by Jun Omae

Status: newaccepted

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 6 years ago by fls@…

Thank you for the quick response!

Question: Is it better to patch or are you planning to commit a new revision to any time soon?

comment:5 Changed 6 years ago by Jun Omae

Resolution: fixed
Status: acceptedclosed

In 16089:

TracWysiwygPlugin: fix WikiPageNames is followed by digits or underscore and WikiPageNames with unicode characters not working (closes #12999)

comment:6 Changed 6 years ago by Jun Omae

Pushed the patch to tracwysiwygplugin/0.12 branch. Thanks for the reporting!

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.