Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#2182 closed defect (fixed)

text like C:D gets [C:D C:D]

Reported by: rupert thurner Owned by: Jun Omae
Priority: normal Component: TracWysiwygPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10


text like C:D gets [C:D C:D], in other words

text like C:D gets [C:D C:D].

Attachments (0)

Change History (4)

comment:1 Changed 9 years ago by Jason Winnebeck

Yes, I've noticed that hyperlinks and such do this as well. Anything that the JS interprets as a link it rewrites into an explicit link, even if the link text matches the link specification exactly.

Perhaps that would be an easy way to patch the code. It seems as if loads wiki into a model, then converts the model to a wiki, which loses original source even if it is functionally equivalent. But, it could follow a "best practice" in source generation if it said for a link it is going to generate [A B] that if A == B, then just generate A not in brackets.

comment:2 Changed 9 years ago by rupert thurner

thanks to the recent correction, the direction wysiwyg --> text works (nearly) as it produces C:D.

having C:D already in the text view and then switch to wysiwyg still produces the [C:D C:D].

i am not sure if the wiki syntax parser is ill as:

  • moinmoin recently went away from wiki:asdf? type of links
  • this editor also has difficulties with such links

comment:3 Changed 9 years ago by Jun Omae

Resolution: fixed
Status: newclosed

(In [2814]) fixed #2182 - a problem that converts from text like C:D to an explicit link.

comment:4 Changed 9 years ago by Jason Winnebeck

This fix works well, except that I wonder if the same technique could be applied to wiki links. I saw that http-type links stay the same, but if I have a text like TracWysiwygPlugin, then if I "round-trip" this then I get [wiki:TracWysiwygPlugin] as a result. If this is a sub-case of this ticket, then if jun66j5 agrees this is a design problem then we could reopen or make a new ticket. In my opinion it is ideal for links to be converted to their canonical form, which should be the shortest/least specified form possible. If anyone disagrees I think this may be a good topic for debate, as I noticed that the editor moves wiki to and from a DOM model, it will always have the side-effect of removing any superficial formatting and canonicalizing all links and formatting.

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.