Commit graph

8 commits

Author SHA1 Message Date
Ed Sanders 2cf163fa23 Move vars inline in preinit code
Change-Id: Ice86931a48b4563a881af16d2fe8e344d49bc73f
2021-05-05 18:06:37 +01:00
Ed Sanders 877d1e3359 Move restbaseId stripping to ve.utils.parsoid
De-duplicates the two implementations we had.

Bug: T253584
Change-Id: If5d15dd4e7e0d3704ca8d75c0a25c529b06f17fb
2020-06-10 20:31:16 +01:00
jenkins-bot d2dd31b805 Merge "Fix #unwrapParsoidSections for pseudo-sections (generated by templates)" 2020-05-18 20:32:28 +00:00
Bartosz Dziewoński 4f70ead440 Fix #unwrapParsoidSections for pseudo-sections (generated by templates)
In 92c3055628 I changed `sectionId > 0`
to `sectionId !== '0'`. That was actually a mistake, as Parsoid's
section IDs can be negative, which indicates pseudo-sections, which
may not have headings.

https://www.mediawiki.org/wiki/Specs/HTML/2.1.0#Headings_and_Sections

Bug: T252238
Change-Id: I9133d4365a71d6db1fa58b69ae3b970166d15c1e
2020-05-18 21:41:13 +02:00
jenkins-bot 38034b1051 Merge "Treat links to diffs and history pages as external links" 2020-05-14 18:54:04 +00:00
Sohom Datta d16d93ccf7 Treat links to diffs and history pages as external links
Wrote code such that only redlinks and normal page urls
 using the script path are treated as internal links.

Bug: T248076
Change-Id: Ie476bf7f4b389a659899eab4351c912fc6b24bee
2020-04-17 22:48:14 +05:30
Bartosz Dziewoński 92c3055628 Fix issues with treating section "numbers" as integers
In MediaWiki, section numbers may be prefixed with 'T-' if they refer
to sections on a transcluded page, so they are not really numbers.

Change e2cb9ce93e caused us to treat them as strings most of the time,
but it looks like there are several places where we treated them as
integer numbers, which I missed when making that patch.

The first two changes in ArticleTarget#restoreEditSection fix T248795
and T248968/T249112, respectively. The other changes are cleanup.

Bug: T248795
Bug: T248968
Bug: T249112
Change-Id: I8373a7ab515595769ce6f3051a182c922415b643
2020-04-01 21:41:17 +02:00
Ed Sanders de47496b19 Move MWutils to preinit and rename to parsoid utils
Bring in ve.dm.MWInternalLinkAnnotation.static.getTargetDataFromHref
and ve.resolveUrl, so that the file has no dependencies on VE.

Change-Id: I03bc455d5484a6c51f3fa2397c64936b829fe7e3
2020-03-24 23:13:16 +01:00
Renamed from modules/ve-mw/ve.MWutils.js (Browse further)