Opened 10 years ago

Closed 10 years ago

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

Reported by: Owned by: rupert thurner Jun Omae normal TracWysiwygPlugin normal 0.10

### Description

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

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


### comment:1 Changed 10 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 10 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 10 years ago by Jun Omae

Resolution: → fixed new → closed

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

### comment:4 Changed 10 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