mediawiki-extensions-Popups/tests/node-qunit
Thiemo Kreuz d1c0613186 Fix regression showing page previews on ^ jump mark links
This happened one time before and was fixed via T212419. It now came
back after I2670331, a patch for T214861 that made the title parser
accept more links than before.

This patch implements a decision tree that goes as follows:
1. If it's a link to another page, it can't be anything but a page
   preview, as having a peek into another page is effectively the
   definition of a page preview.
2. Otherwise it's probably a reference preview, but only if:
   * It's a link with a jump mark.
   * The link is actually marked as being a "reference".
   * Reference previews are enabled.
3. If neither of these definitions fit, do nothing. Note this is not
   "hiding errors" we would be able to fix in this code. There are many
   ways to manually arrange wikitext in a way that it looks like one or
   the other, without fulfilling all requirements. Unfortunately the
   user who would see error message or dysfunctional popups would not
   be the same as the user who wrote such wikitext.

Bug: T216683
Change-Id: I8d021f19ddc73a261e6a0c62959ddd0cb1d3182d
2019-02-21 09:30:35 -07:00
..
changeListeners build: Update eslint-config-wikimedia to 0.10.0 2019-01-31 11:05:33 +01:00
gateway Fix regression showing page previews on ^ jump mark links 2019-02-21 09:30:35 -07:00
instrumentation Unify /* global … */ annotations for ESLint 2019-02-20 14:29:24 -07:00
integrations Hygiene: replace QUnit assert.equal with strictEqual() 2018-06-18 19:48:16 +00:00
preview Minor fix-ups to type hints in JavaScript code 2019-02-14 11:15:01 +01:00
reducers Fix bug in ABANDON_END test 2018-12-08 11:17:34 +05:30
ui Add all reference type icons and messages 2019-02-20 09:32:11 +01:00
.eslintrc.json build: Update linters 2018-09-11 10:26:35 -07:00
actions.test.js Minor fix-ups to type hints in JavaScript code 2019-02-14 11:15:01 +01:00
bracketedPixelRatio.test.js build: Update linters 2018-09-11 10:26:35 -07:00
changeListener.test.js build: Update linters 2018-09-11 10:26:35 -07:00
container.test.js build: Update linters 2018-09-11 10:26:35 -07:00
counts.test.js Hygiene: replace QUnit assert.equal with strictEqual() 2018-06-18 19:48:16 +00:00
experiments.test.js build: Update eslint-config-wikimedia to 0.10.0 2019-01-31 11:05:33 +01:00
formatter.test.js build: Update linters 2018-09-11 10:26:35 -07:00
getPageviewTracker.test.js Unify /* global … */ annotations for ESLint 2019-02-20 14:29:24 -07:00
integration.test.js Minor fix-ups to type hints in JavaScript code 2019-02-14 11:15:01 +01:00
isEnabled.test.js Unify /* global … */ annotations for ESLint 2019-02-20 14:29:24 -07:00
previewBehavior.test.js Unify /* global … */ annotations for ESLint 2019-02-20 14:29:24 -07:00
run.js Switch from babel-preset-env to @babel/preset-env 2018-12-11 13:09:45 +05:30
stubs.js Replace rare {!…} and {?…} JSDoc syntax 2019-01-24 21:00:45 +01:00
title.test.js Unify /* global … */ annotations for ESLint 2019-02-20 14:29:24 -07:00
userSettings.test.js build: Update linters 2018-09-11 10:26:35 -07:00
wait.test.js build: Update linters 2018-09-11 10:26:35 -07:00