Page MenuHomePhabricator

Add CodeMirror auto-linking where missing
Open, Needs TriagePublicFeature

Description

When editing using CodeMirror 6 with the appropriate option enabled, wikitext links, templates, and some other link-y things can be opened with modifier + click (T303392, T389902, T401057). The same auto-linking should apply in the following additional cases:

  • CSS/JavaScript comments (T413457)
  • HTML-style comments in wikitext (<!-- [[Link]] -->)
  • Lua modules, within...
    • comments (-- [[Link]])
    • references to other modules (require( 'Module:Example' ), mw.loadData( 'Module:Example' ), mw.loadJsonData( 'Module:Example/data.json' ))
      • Also T386436, if there's agreement to move forward with it.
  • ...

(If you think of other "link-y things," please add them to the list! Also, feel free to create subtasks for any of these, if necessary.)

Event Timeline

Auto-linking is also not available in 2017 editor, as written in https://www.mediawiki.org/wiki/Extension:CodeMirror, but I'm not sure if it's in the scope of this task.

Auto-linking is also not available in 2017 editor, as written in https://www.mediawiki.org/wiki/Extension:CodeMirror, but I'm not sure if it's in the scope of this task.

That has to belong to VisualEditor-MediaWiki-2017WikitextEditor because CodeMirror cannot access any pointer events.