Commit graph

16 commits

Author SHA1 Message Date
James D. Forrester 122f49b2dd build: Bump file copyright notices for 2017
Change-Id: I3c20809e71cc0da58123e1b5f29c4f3aac945496
2017-01-03 08:58:33 -08:00
James D. Forrester a835f4f9d5 Use canonical ve.dm.TransactionBuilder.static.newFrom* methods
Change-Id: I082048a677baa2699d94e21548373952d52db61b
2016-12-01 10:43:10 -08:00
Alex Monk 25933c09ec Strip RESTBase IDs from HTML generated when wikitext is pasted
Bug: T146054
Change-Id: I0013673a9e41ea191ea64f3208a06288efb2ecd3
2016-10-13 17:42:11 -07:00
Ed Sanders 56c56e81fe Move image-paste blocking to transfer handler match function
By not matching, we allow other types of paste to happen, e.g. HTML/plain text.

Bug: T142622
Change-Id: I3a2224ab23b5073eb7b031134ecc3170ccc782c0
2016-08-26 00:54:39 +00:00
Ed Sanders f30000ed4c Wikitext paste: Discard autoGenerated items after conversion
Otherwise the reference contents (stored in the reflist) is lost.

Bug: T134228
Depends-On: I718963e3c460a5bed38fba4152b03442bbe6169e
Change-Id: I20171eb97eb1b4757a2c8a25217adb4d680a9057
2016-05-04 10:58:01 -04:00
Ed Sanders 681250dd5e Filter out auto-generated reference lists
Bug: T101553
Bug: T127664
Change-Id: Idc8c6f30ccdd5eaf76a3f7c1b923d8656ca36413
Depends-On: I24250845e97acb4b7de9c495cb46dbd28fc8817e
2016-03-28 17:23:42 +00:00
Ed Sanders 5cc10a810a Wikitext paste: Move MWWikitextStringTransferHandler matchRegExp into a registry
This allows extensions to register their own rules for detecting wikitext,
e.g. matching '<ref>'.

Bonus: Strip the autogenerated <references/> tag which
gets inserted when converting a <ref>.

Bug: T128805
Change-Id: I7a38db45d25e86ff3f3f6199aa04425ec98f7cc4
2016-03-05 22:47:00 +00:00
James D. Forrester ada58df361 build: Bump file copyright notices for 2016
Change-Id: I3c618c196e504a80ca297a4132a17f1977a24fb7
2016-01-03 14:57:25 -08:00
Ed Sanders f9ca524ef9 Wikitext paste: Fail if result has no visible content
For example if '[[category:foo]]' is pasted.

Bug: T118191
Change-Id: I9c51846414dd6b885b33f1dc9076edadbc6464c4
2015-11-18 03:33:14 +00:00
Ed Sanders e1f9adebfe Rename ImageTransferHandler to MediaTransferHandler
Change-Id: If68e2e4a9dbff4707fb9cbbadcd69a7ff8375a4b
2015-10-14 12:41:25 +00:00
Ed Sanders 557340426f Media upload: Initiate upload process on image drop
Bug: T40031
Change-Id: I521909d27c390faad7d62f717f2b97b7676e5a63
2015-10-13 11:24:34 -07:00
C. Scott Ananian 7cc23367f6 Specialized inspector for ISBN magic links
Implement a special node type, context item, and inspector for
ISBN/PMID/RFC magic links.  Add buttons to the link inspectors
to convert back and forth between "simple" links, and magic links.

Depends on I5d000d8b63dafdfe0a2753069d3f0ac5b03b8829 in Parsoid
for clean round-tripping of localized ISBN magic links.

Bug: T63558
Change-Id: Id5b7a2ae3c80b0e5eed598f0bd024d3e94f7e9aa
2015-09-01 14:25:59 -04:00
jenkins-bot c02874842b Merge "Fix pattern for matching wikitext headings" 2015-08-25 16:23:15 +00:00
Ed Sanders 456439923a Fix pattern for matching wikitext headings
Fix the back-reference to \1 (1st set of brakcets).

Add an test to make sure the example sequences actually trigger the
wikitextString handler, and tweak test to ensure that the start-of-line
restriction in the heading regexp doesn't affect link matches.

Change-Id: I76187a12292a4923d1ee2505cfb955431ac252bb
2015-08-24 16:54:45 -04:00
Ed Sanders a33b082c13 MWWikitextStringTransferHandler: Show indeterminate progress bar while converting
Also store the abortable API request so it can be cancelled
by the dialog.

To test this, put sleep(4); in ApiVisualEditor.php.

Depends on Ied21e574baa in core.

Change-Id: I83ffa9e0b7164ca4a34eae86cde452d8f38dc853
2015-08-23 14:18:40 -07:00
C. Scott Ananian a6775796fe Detect paste of wikitext and convert it
This invokes Parsoid to convert likely wikitext pastes.

This addresses about 20% of the <nowiki> insertion quantified at
https://fr.wikipedia.org/wiki/Wikip%C3%A9dia:%C3%89diteurVisuel/Avis/Nowiki
for 2015-04-08 which were due to inadvertent pastes of wikitext.

For a better user experience, suppress Parsoid's P-wrapping if the
output consists of a single top-level P element.  This ensures that
pasting '[[Foo]]' won't add an unexpected newline before the paste.

Bug: T54204
Bug: T109449
Change-Id: I26a4cd8dc5b7e7caf16ca081dbe7baf6a7db8e5c
2015-08-18 15:16:06 +00:00