Commit graph

5249 commits

Author SHA1 Message Date
Marc Ordinas i Llopis 3c82fb7787 T58916: Parse extension parameters as plain text
Also encode cite ids properly as now they can contain arbitrary
text. Change in blacklist due to this.

TODO: Investigate if it would be better to do this directly in
the tokenizer.

Change-Id: Ic112124e90d256d73a351d0d57fe3c7546fa065f
2014-12-22 14:02:05 +00:00
Translation updater bot ec6fbe7c3c Localisation updates from https://translatewiki.net.
Change-Id: I2340fdb5e96cbb84eafbf82de6de9b28f70a5709
2014-12-08 23:19:49 +01:00
Arlo Breault 9e6055d547 Fix failures from v2 endpoint
* Although this resolves the crashes, I'm unsatisfied with it as a
   proper fix to the underlying issue. There are many places throughout
   the codebase where we serialize and then parse document fragments
   that should be instrumented to store and unpack data-* attributes.

Bug: T76518
Change-Id: Idca1b0a37ec924a71cb51160d000c7de9717d422
2014-12-02 16:47:32 -08:00
Translation updater bot b5fd2b8d55 Localisation updates from https://translatewiki.net.
Change-Id: Id2d71b538ff839e3086704081af61d99d0165bd5
2014-12-02 22:03:21 +01:00
Translation updater bot 7faf5cde2f Localisation updates from https://translatewiki.net.
Change-Id: Ied781b2216cbad41343f2545c38d6ef443b5e799
2014-11-23 22:39:30 +01:00
Translation updater bot 5045fa3507 Localisation updates from https://translatewiki.net.
Change-Id: I01f97e2989fd64dbe792b2c9fb39c077c3869770
2014-11-13 23:07:00 +01:00
Translation updater bot 9cab73914c Localisation updates from https://translatewiki.net.
Change-Id: I4aca84fc16ec6e62c134c6812ba06ab7ef7c94a3
2014-11-08 22:16:51 +01:00
Translation updater bot bc0995ebe0 Localisation updates from https://translatewiki.net.
Change-Id: I284e28725d49d3f894eb493ef03e660878e06daa
2014-11-02 21:56:48 +01:00
Amir E. Aharoni c9a5b7b1cb Replace == with test for isset and empty string
The coding conventions suggest avoiding ==,
and for this condition definedness is actually more relevant
than whether the string has any text, but since
the string can also be '0', checking for !$text doesn't work.

Similar to I15b422d3345bf4522e68a17dce9682ff28484559 .

Change-Id: Ib823678b639bf4f1a92dffcd9e41c780b56ab128
2014-10-28 19:07:24 +00:00
Amir E. Aharoni 60a0821634 Replace == with isset
The coding conventions suggest avoiding ==,
and for this condition definedness is actually more relevant
than whether the string has any text.

Change-Id: I15b422d3345bf4522e68a17dce9682ff28484559
2014-10-28 19:06:33 +00:00
James D. Forrester 7f10ca97f1 Remove Special:Cite, now moved to its own repository
Change-Id: I6ae358b6855911016793c3227bfc1c04a8637428
2014-10-28 12:02:21 -07:00
Translation updater bot 272cdbb49c Localisation updates from https://translatewiki.net.
Change-Id: I2163747e28e82cea77c316127c3c85beb0a68e14
2014-10-27 20:08:06 +01:00
Subramanya Sastry 8694562ee8 (Bug 57252) Generate HTML5-compliant cite id/about attr values
* Currently, this mimics Cite.php behavior where "a b" and "a_b"
  are considered identical ids.

* Added new parser test.
* Fixed output of another test.
* Fixed section name of a commented out test.

Change-Id: I0c51404c3e659bbddfe9a8909aa6a109d368b762
2014-10-24 17:59:17 -05:00
Amir E. Aharoni 458fb4e705 Replace srting comparison with boolean condition
In this function $text can be both false and empty string.
It is more intuitive to use a boolean operator here than
to rely on the fact that comparing to '' using == happens
to give the correct result.

Change-Id: I08248a3fcade7744287e9b9f3bc176d29ac1ecde
2014-10-01 17:42:18 +03:00
Amir E. Aharoni f85ae02fa9 iEarly return for readability
Change-Id: I80ccb1766b1635c32669818647aad85db95c4866
2014-10-01 17:25:58 +03:00
Amir E. Aharoni 09a1ae5929 Code cleanup for phpcs
Change-Id: I2419c904629e02e1ec4cb24325acd0e2db1297db
2014-09-27 19:56:47 +03:00
Amir E. Aharoni 4840a46c5c Credits for en.json
Change-Id: I4e3674a5dfba5f0cf0b4e0985dca85491b37e359
2014-09-27 19:23:39 +03:00
Amir E. Aharoni d027bc9dfb Convert spaces to tabs in en.json
Change-Id: Ie4d5d097d6b0bbd5b85908be9a7ec745debaea43
2014-09-27 19:20:59 +03:00
Arlo Breault 90c5303678 (Bug 53109) Move data-mw away from manual json attr loading
* This is both faster and consistent with how we're accessing other
   parsoid attributes. It's also a step towards not having this data in
   the html output.

 * Changes to parserTests and the blacklist are for attribute order.

 * Requires upgrading domino to 1.0.18
   https://github.com/fgnass/domino/pull/48

Change-Id: I1edbc260887d480adf04763b15043c374e27cceb
2014-09-27 08:53:22 -07:00
Translation updater bot d45691cb43 Localisation updates from https://translatewiki.net.
Change-Id: I6eaf22336c0895459062162cf47731a9aa140996
2014-09-24 22:13:21 +02:00
Translation updater bot 8a48edee27 Localisation updates from https://translatewiki.net.
Change-Id: I8bfec8822b10d4a4e5f29fd563318c0e61e2391c
2014-09-16 19:41:55 +02:00
Subramanya Sastry 6c503e8973 (Bug 64901) Fix paragraph-wrapping to match PHP parser + Tidy combo
General changes
---------------
* Replaced the hacky 'inBlockNode' parser pipeline option with
  a cleaner 'noPWrapping' option that suppresses paragraph wrapping
  in sub-pipelines (ex: recursive link content, ref tags, attribute
  content, etc.).

Changes to wt2html pipeline
---------------------------
* Fixed paragraph-wrapping code to ensure that there are no bare
  text nodes left behind, but without removing the line-based block-tag
  influences on p-wrapping. Some simplifications as well.

  TODO: There are still some discrepancies around <blockquote>
  p-wrapping behavior. These will be investigated and addressed
  in a future patch.

* Fixed foster parenting code to ensure that fostered content is
  added in p-tags where necessary rather than span-tags.

Changes to html2wt/selser pipeline
----------------------------------
* Fixed DOMDiff to tag mw:DiffMarker nodes with a is-block-node
  attribute when the deleted node is a block node. This is used
  during selective serialization to discard original separators
  between adjacent p-nodes if either of their neighbors is a
  deleted block node.

* Fixed serialization to account for changes to p-wrapping.
  - Updated tag handlers for the <p> tag.
  - Updated separator handling to deal with deleted block tags
    and their influence on separators around adjacent p-tags.
  - Updated selser output code to test whether a deleted block
    tag forces nowiki escaping on unedited content from adjacent
    p-tags.

Changes to parser tests / test setup
------------------------------------
* Tweaked selser test generation to ensure that text nodes are always
  inserted in p-wrappers where necessary.

* Updated parser test output for several tests to introduce p-tags
  instead of span-tags or missing p-tags, add html/parsoid section,
  or in one case, add missing HTML output.

Parser Test Result changes
--------------------------
Newly passing
- 12 wt2html
- 1 wt2wt
- 3 html2html
- 3 html2wt

Newly failing
- 1 html2wt

  "3. Leading whitespace in indent-pre suppressing contexts should not be escaped"
  This is just normalization of output where multiple HTML forms
  serialize to the same wikitext with a newline difference. It is not
  worth the complexity to fix this.

- 1 wt2wt
  ""Trailing newlines in a deep dom-subtree that ends a wikitext line"
  This is again normalization during serialization where an extra
  unnecessary newline is introduced.

- A bunch of selser test changes.
  182 +add, 188 -add => 6 fewer selser failures

  - That is a lot of changes to sift through, and I didn't look at every
    one of those, but a number of changes seem to be harmless, and just
    a change to previously "failing" tests.

  - "Media link with nasty text" test seems to have a lot of selser
    changes, but the HTML generated by Parsoid seems to be "buggy" with
    interesting DSR values as well. That needs investigation separately.

  - "HTML nested bullet list, closed tags (bug 5497) [[3,3,4,[0,1,4],3]]"
    has seen a degradation where a dirty diff got introduced.
    Haven't investigated carefully why that is so.

Change-Id: Ia9c9950717120fbcd03abfe4e09168e787669ac4
2014-09-16 11:59:55 -05:00
Translation updater bot 315449fed7 Localisation updates from https://translatewiki.net.
Change-Id: If975851c5e7194f66f40b8d3fc4fbe2730ee93c9
2014-08-31 21:52:27 +02:00
Translation updater bot 9da5cc02db Localisation updates from https://translatewiki.net.
Change-Id: Ibe34881b52e460332d909d8246e2d71c2b70e354
2014-08-29 21:17:52 +02:00
Translation updater bot def1d72887 Localisation updates from https://translatewiki.net.
Change-Id: I3fbcc9f7986ed5ba87a0e51abeffdf800a43063f
2014-08-26 21:46:36 +02:00
Translation updater bot 192f5a523e Localisation updates from https://translatewiki.net.
Change-Id: I779fc8e7212ebb2aa4a606cbcc978b3ef57f64ae
2014-08-23 21:51:42 +02:00
Subramanya Sastry f5e7f667d5 (Bug 69827): Supported nested <ref> tags once more
* Nested <ref> tag support was broken in 69b6ec4d since that patch
  effectively processed <refs> only on the final DOM rather than
  extracted <ref> information in sub-pipelines. In doing so, it
  broke support for <ref> in <ref> tags which are supported by {{efn}}
  templates and used as follows.

  {{efn|A clarification.{{sfn|Smith|2009|p=2}}}}

  The {{sfn}} tpl generates a <ref> tag inside another <ref> tag
  generated by the {{efn}} tpl.

* This patch fixes the breakage by processing <ref> content after it
  is extracted (in case it is known to have nested <ref> tags).

* This fixes the rendering on enwiki/Otto_I%2C_Holy_Roman_Emperor
  and is an improvement over when it was broken. The nested <ref>
  gets id 18 (just like the Cite.php handling) whereas it used to
  get id 1 before the breakage.

* TODO:
  - Figure out a way to add a test for this.

Change-Id: Ib82b75f66249b2133a123adbe6fd7acbfd8ec8fb
2014-08-22 13:04:50 -05:00
Translation updater bot 4957e6c335 Localisation updates from https://translatewiki.net.
Change-Id: I782103740a8febdd0164b26e8070d68830c03c75
2014-08-18 22:36:58 +02:00
Translation updater bot 6ef84d0062 Merge "Localisation updates from https://translatewiki.net." 2014-08-17 21:18:27 +00:00
addshore f1c78e330f Use public instead of var in classes
Change-Id: I351e0b776497b9cfa9914400048e5ea9f00b5aac
2014-08-17 22:04:15 +01:00
Translation updater bot bfa78f2c08 Localisation updates from https://translatewiki.net.
Change-Id: I6b79924fcd92bd983d3ed7b6dac9e586a78fe593
2014-08-17 23:01:36 +02:00
Translation updater bot cad3dcc05c Localisation updates from https://translatewiki.net.
Change-Id: Iea9e02dd96b466a7607243a891f1dbbc1d71283f
2014-08-13 23:02:38 +02:00
Translation updater bot 97379749bb Localisation updates from https://translatewiki.net.
Change-Id: Id1b8a82a2af6456bc70636946dd63e6c0cd1cef9
2014-08-02 22:22:13 +02:00
Translation updater bot cc70b9f65a Localisation updates from https://translatewiki.net.
Change-Id: I2ceb4c83cc959f0ee44940e4d14841312f5a0f29
2014-07-30 21:56:44 +02:00
Translation updater bot 617de9a2d3 Localisation updates from https://translatewiki.net.
Change-Id: I14d8d351259ed5c503b39162b3d2e65380ffe075
2014-07-29 21:53:43 +02:00
Translation updater bot cdcb19ff7f Localisation updates from https://translatewiki.net.
Change-Id: Id7b31f9f0a2be4aecced9ce7d0d121e89cb36302
2014-07-28 21:20:35 +02:00
James D. Forrester 7d37a9f182 Add license details and give credit to more authors (based on git shortlog)
Change-Id: Iaa123a76e5dc52f44b3500e3add001581be1462d
2014-07-26 16:16:47 -07:00
Jforrester d7fc63b66d Revert "Provide way for users to find articles with the automatic <references />"
Apparently causing parser failures and corruptions in production.

This reverts commit 44472de458.

Change-Id: I923ed39f405d926b70a5098cbde6eee0538eee51
2014-07-24 12:27:02 -07:00
Translation updater bot e3be397f27 Localisation updates from https://translatewiki.net.
Change-Id: I800ab5e10c59123bd4d3e5f2847a5767daf022be
2014-07-22 23:00:11 +02:00
Translation updater bot 5c7b39d210 Localisation updates from https://translatewiki.net.
Change-Id: I2321be4c02c698bd813c81398f3a734cad50be2f
2014-07-21 21:39:55 +02:00
Translation updater bot e57ee60b38 Localisation updates from https://translatewiki.net.
Change-Id: I7bb88c01fb0bcbb7be439a8dcb2f29c29eaecced
2014-07-20 21:06:56 +02:00
Translation updater bot 7dc8077c98 Localisation updates from https://translatewiki.net.
Change-Id: Iba0eb76d5d1ed292aef2bbc408623e3e03e45254
2014-07-18 21:26:32 +02:00
Translation updater bot 45125b8c81 Localisation updates from https://translatewiki.net.
Change-Id: I2ff23ae6cbf497b1d81064ce516f4a61bde98216
2014-07-17 22:56:10 +02:00
Translation updater bot dea75631e6 Localisation updates from https://translatewiki.net.
Change-Id: I7ee82199c3eda6b62ef317ac3ff5c9794ddc87aa
2014-07-16 22:00:21 +02:00
Translation updater bot 500c69e847 Localisation updates from https://translatewiki.net.
Change-Id: I2279e1640e108d34c63338f39bdc9382f348c953
2014-07-15 22:04:48 +02:00
Translation updater bot 53d6f1bbe1 Localisation updates from https://translatewiki.net.
Change-Id: I13226a232dcdfd8d677fff64d161310dad3c0dc7
2014-07-14 21:59:52 +02:00
Translation updater bot 9c4b83bd4a Localisation updates from https://translatewiki.net.
Change-Id: Id45c13b0883a5e2d37f8c47a36b3ca08e8d444f0
2014-07-13 22:21:10 +02:00
Translation updater bot a083db58e3 Localisation updates from https://translatewiki.net.
Change-Id: Ib18f96902a972346cf08c9c67aea4f966bdd275f
2014-07-12 23:20:38 +02:00
Alex Monk 44472de458 Provide way for users to find articles with the automatic <references />
By adding a tracking category

Bug: 67700
Change-Id: I62584de085ae7a849a099e127bd950692a0dff8a
2014-07-11 22:47:51 +01:00
James D. Forrester 672124cf26 Remove 'experimental' popups functionality that was never used
Bug: 67282
Change-Id: Ib0c8c0daae62c9398f15397917232447c6113069
2014-07-09 11:06:18 -07:00