These changes allow us to be more aggressive in autolinking ISBNs (no
need anymore to wait for the user to type a space or move their
selection) and more correct in autolinking RFCs and PMIDs (stray
spaces and dashes no longer mess them up).
* ISBN numbers can only be 10 or 13 digits long. We don't need to
handle arbitrary lengths.
* If a number does not begin with 978 or 979, it's the ISBN-10 variant
and we can autolink it as soon as the user types 10 digits.
* If a number begins with 978 or 979, it can be either.
* But if we already have 13 digits typed, autolink immediately.
* Otherwise, use a delayed sequence to see if it ends at 10 digits.
* RFC and PMID numbers can consist only of digits, no optional spaces
or dashes are allowed. Typing a space or dash will immediately
autolink the number.
Bug: T117165
Change-Id: I6a085cd78d910661245a351f3ceb3fabe2f093cf
The trailing space at the end of the regexp is no longer required to
prevent matching (and executing) too soon. We also don't need to know
about trailing punctuation.
However, to prevent the match from ending in the middle of typing, we
have to allow for ' ' and '-' at the end of the match.
Tweaked tests to better match the intent now that a trailing space is
not included, but they pass without changes too, the command is quite
permissive.
Bug: T117165
Depends-On: Ie36046fa43ce49f8a25c99f2de577eb296d68a51
Depends-On: I2af0a738afa43295bf6d7d612cac4349bc6cd20d
Change-Id: I7c28d5c93b1a441387ad05a75846af83d2b21b6a
Refactor save dialog setup so logic for canPreview/canReview
is external and passed in.
'Show preview' will show in the VE command help dialog until
I56c1036e6 is merged in core.
Bug: T149914
Change-Id: Id718ad622be43c03df61d12b8688d53462c59f36
Create a new MWSaveDialogAction, which can be hooked up to triggers. Switch
the existing save dialog accesskey to just use the trigger system.
(Maintaining all the accesskey logic, so we don't change the shortcut on
people.)
Bug: T149914
Change-Id: I9b4ef8504148703556f802b266a517dd5098c06b
shallowCloneFromRange can a broken document if you pass
a collapsed range. That should be fixed upstream but for
now this fixes a major bug (and is faster).
Bug: T150492
Change-Id: I9b539c588d91ef7f22e662c7cae0b3f89b21d33a
Using the same logic we used for converting pasted URLs, detect
internal links by matching their base.
Currently link pasting is still disabled in the VE target, but
has been enabled elsewhere (Flow).
Change-Id: Iebd61abbe1fe82fd18d129e1dbc815ca75f44e87
If you create an autolink in the middle of bolded text, the magic link
should also be bolded. Similarly, if you convert a bolded simple link
to a magic link, the magic link should stay bolded.
Change-Id: I38c7f3c0c275851049088a37f3b37d815ed38e4e
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
New changes:
89f6c2d Strip trailing quotes when autolinking URLs
Local changes:
* Strip trailing quotes and non-URL characters when auto-linking
Update ve-mw to match I58a9c7f97ef10d9f495e65da17f208b9fc431aa4 in core,
since otherwise the ve.ui.LinkAction.test.js case with a quoted link
will begin to fail.
Make the set of stripped characters better match the combination of
EXT_LINK_URL_CLASS in the PHP parser and the explicitly-stripped
trailing punctuation in Parser.php::makeFreeExternalLink().
Add some international quotation marks while we're at it to make
everyone equally happy.
Change-Id: Iaffac4b073aeafa4f1137265c2d95e425c24d553
Depends on Ibdad2fa98fca08eeaa96bf33a08dd7723c1edb8c in Parsoid.
Depends on I3dcd289ed7b565b9162ee671038eeb45449e1215 in ve-core.
Bug: T109498
Change-Id: I5650410d7fca30c90baddd4f0c3f6d80e6b39042
New changes:
985edd2 Localisation updates from https://translatewiki.net.
9883b44 Follow-up 985edd24: Fix build for added language 'shn'
b0d5ee2 Localisation updates from https://translatewiki.net.
18ca837 Localisation updates from https://translatewiki.net.
f6a0945 Don't include trailing punctuation in autolinked typed text
Local changes:
* Add MW-specific trailing punctuation rules for autolinking
Change-Id: Iaa620142222f47e9fde2d03b935f38c24d38800b
New changes:
61d20a1 Hide on-screen keyboard when selecting nodes on all mobile platforms
e5aff79 Localisation updates from https://translatewiki.net.
a99a897 Update OOjs UI to v0.12.3
3c01a14 Make DM nodes sensibly hashable
a611eb9 Make ve.dm.example.postprocessAnnotations fluent
496c895 Update ve.dm.ElementLinearData#hasContent documentation
fcaa035 Support RegExp sequences; trigger sequence matcher after newline
edda1d4 Add a mechanism to wait until ve.init.platform has been created
e174155 Autolink URLs when typing
ac9248f Allow drag and drop of links (and subsequent autolinking)
c88fad6 Localisation updates from https://translatewiki.net.
Local changes:
* Define `ve.init.platform.getUnanchoredExternalLinkUrlProtocolsRegexp`.
* Make `ve.ui.MWLinkAction` extend `ve.ui.LinkAction`.
* Override `ve.ui.LinkAction.getLinkAnnotation` so auto-links use the proper
`ve.ui.MWExternalLinkAnnotation` type.
Change-Id: I934f76158512e2e89b614ed92fef6481f70728e7
Set up the surface widget as inside the reference dialog, and let
the citation action notify the template dialog the name of the
dialog it is in. If the tool was executed from within the reference
dialog, skip over creating a reference and instead insert the
citation as a template.
* Depends on ve-core fix I709eeb0de475 *
Bug: T94621
Change-Id: I4871f8c0afe190117cc90e88227b37f292a71e20
* Introduced MWLinkAction which opens the right link inspector
based on what is selected.
* Added MWLinkInspectorTool overriding core's 'link' tool that
executes MWLinkAction
* Removed MWLinkNodeInspectorTool and linkNode command,
they're unneeded now
Bug: 72150
Change-Id: I03bd6ab1f67f31a6e6cb717cf4298e80e64637b7
Also update tools for changes in VE core.
New changes:
e4de14b Make tools use commands
e029817 Make getToolsForNode place primary commands first
Change-Id: I66575ee6d49e6b2f5a5f789978da98bb55e6dc5e