https://bugzilla.wikimedia.org/show_bug.cgi?id=43429
Web browser: ---
Bug ID: 43429
Summary: Removing link trail doesn't affect the output
Product: Parsoid
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: JS/serializer
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
Classification: Unclassified
Mobile Platform: ---
In investigating bug 43089, we found that removing a link trail (i.e. [[Link]]s
--> [[Link]]) is impossible in the VisualEditor. This is a Parsoid bug, can be
reproduced with this command:
echo "[[Link]]s" | node parse.js | sed 's/Links/blah/;' | node parse.js
--html2wt
This is a further result of our steadfast approach of "if the tests aren't
broken, it's working" -- we didn't consider changes for a long time, and now
that changes are possible, our hacks for roundtripping don't always work....
Suggested solution:
1. First try to find the initial link text (sans trail) in the current link
text. If it's there, the new trail is whatever is left.
2. If that failed, try to find the old trail in the current text with a regex
like /s$/. If you find it, emit it.
3. If both of those fail, don't emit a link trail. The trail has been modified
enough that it's probably just within the text of the link now, and we won't
lose meaning by just using the [[link|text]] syntax.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l