Modify

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#2182 closed defect (fixed)

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

Reported by: ThurnerRupert Owned by: jun66j5
Priority: normal Component: TracWysiwygPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

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 7 years ago by JasonWinnebeck

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 7 years ago by ThurnerRupert

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 7 years ago by jun66j5

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:4 Changed 7 years ago by JasonWinnebeck

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.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.