Last modified: 2014-11-10 11:18:06 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T52098, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50098 - VisualEditor: Ordered application of annotations to avoid fragmentation (e.g. ''[[Foo|Fo]]''[[Foo|o]])
VisualEditor: Ordered application of annotations to avoid fragmentation (e.g....
Status: ASSIGNED
Product: VisualEditor
Classification: Unclassified
Data Model (Other open bugs)
unspecified
All All
: Normal major
: ---
Assigned To: Ed Sanders
:
: 51054 51422 52912 54092 73201 (view as bug list)
Depends on:
Blocks: 73202
  Show dependency treegraph
 
Reported: 2013-06-24 14:13 UTC by Oliver Keyes
Modified: 2014-11-10 11:18 UTC (History)
12 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Oliver Keyes 2013-06-24 14:13:48 UTC
Fairly self-explanatory (and weird).
Comment 1 James Forrester 2013-06-24 14:35:47 UTC
Annotations get applied to the text in the order that they're applied in reality; we should probably make links higher-priority. Thus [[Foo|F'''''o''o''']] rather than [[Foo|F]]'''''[[Foo|o]]''[[Foo|F]]'''.
Comment 2 Ed Sanders 2013-06-24 17:13:54 UTC
Except you'd probably rather have ''[[Foo|Bar]]'' than [[Foo|''Bar'']]
Comment 3 James Forrester 2013-06-24 17:44:07 UTC
(In reply to comment #2)
> Except you'd probably rather have ''[[Foo|Bar]]'' than [[Foo|''Bar'']]

Yeah; so it should only break out when it's not entirely nested? Spoke to Roan about this - he says it's a relatively-major change in DM that he did "about a quarter" of the work for as part of DM rewrite 2 (or similar). Pull from release?
Comment 4 James Forrester 2013-07-14 23:56:54 UTC
To re-visit this, some rules I think encapsulate what we want:

- Spanning annotations should never be broken (because that changes the render/interaction result), in the following order:
-* Links
-* Superscript / Subscript
-* Underline / Strikethrough

So: 

* <a href="Foo"><i>Foo</i>Bar</a> -> [[Foo|''Foo''Bar]], not ''[[Foo]]''[[Foo|Bar]]
* <u>Foo<b>Bar</b></u> -> <u>Foo'''Bar'''</u>, not <u>Foo</u>'''<u>Bar</u>'''
* <u>Foo<a href="Bar">Bar</u>Baz</a> -> <u>Foo</u>[[Bar|<u>Bar</u>Baz]], not <u>Foo[[Bar]]</u>[[Bar|Baz]]
* <sup>Foo<s>Bar</sup>Baz</s> -> <sup>Foo<s>Bar</s></sup><s>Baz</s>, not <sup>Foo</sup><sup><s>Bar</s></sup><s>Baz</s>

- Annotations to links' anchors which are otherwise identical to their target

So:
* <a href="Foo"><i>Foo</i></a> -> ''[[Foo]]'', not [[Foo|''Foo'']]


- Otherwise, annotations should be minimally-spanning

So:
* <a href="Foo"><i>Bar</i></a> -> ''[[Foo|Bar]]'', not [[Foo|''Bar'']]
* <i><b>Foo</b>Bar</i> -> '''''Foo'''Bar'' not '''''Foo'''''<nowiki />''Bar''

Does this achieve what we want? (Obviously some of this is already done by Parsoid.)
Comment 5 James Forrester 2013-08-19 21:58:52 UTC
*** Bug 52912 has been marked as a duplicate of this bug. ***
Comment 6 Elitre 2013-08-21 14:07:21 UTC
In the meantime, can we suggest workarounds to "get the code right"?
I.e. to avoid [[Foo|''Bar'']] you should italicize first, and link only after that. I added this to the Italian User guide, other tips I might be missing? Thanks.
Comment 7 Chris McKenna 2013-08-23 10:04:47 UTC
Bug 51422 seems to cover the same ground as this, is it worth keeping as a separate case or better to merge?
Comment 8 James Forrester 2013-08-23 17:27:08 UTC
(In reply to comment #7)
> Bug 51422 seems to cover the same ground as this, is it worth keeping as a
> separate case or better to merge?

Merge - thanks for the spot.
Comment 9 James Forrester 2013-08-23 17:29:15 UTC
*** Bug 51422 has been marked as a duplicate of this bug. ***
Comment 10 James Forrester 2013-11-19 10:12:11 UTC
*** Bug 54092 has been marked as a duplicate of this bug. ***
Comment 11 James Forrester 2014-03-11 01:37:55 UTC
*** Bug 51054 has been marked as a duplicate of this bug. ***
Comment 12 James Forrester 2014-11-10 11:17:07 UTC
*** Bug 73201 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links