Page MenuHomePhabricator

'' is frequently used unnecessarily in VisualEditor and put in <nowiki>
Open, LowestPublic

Description

In the last couple of months I've been following the appearance of <nowiki> in the Hebrew Wikipedia.

One of the most common reasons for its appearance is that people type '' instead of " - that is, two apostrophes instead of a doublequote.

This made me notice that neither '' nor ''' produce a "Wikitext markup detected" warning bubble.

Is there a reason for not showing this warning for these pieces of wiki syntax? Outputting <nowiki> when people write them in VE is the right thing to do, but usually they are not supposed to be written at all. (The only notable reason for writing them I can think of is in the Neapolitan language, in which two consecutive apostrophes is a part of the orthography; for an example, see Terra d''e fuoche.)

If there's no reason for this, then the bubble should be shown.

Another option is to auto-replace '' (two apostrophes) with " (doublequote) while typing and let people undo it, as suggested by @Pginer-WMF (but Neapolitan will need special handling).

Event Timeline

Amire80 raised the priority of this task from to Medium.
Amire80 updated the task description. (Show Details)
Amire80 added a project: VisualEditor.
Amire80 added subscribers: Amire80, eranroz, Mooeypoo.
Amire80 renamed this task from '' and ''' don't produce "Wikitext markup detected" to '' is frequently used unnecessarily in VisualEditor and put in <nowiki>.Jul 23 2015, 2:28 PM
Amire80 updated the task description. (Show Details)
Amire80 set Security to None.
Amire80 added a subscriber: Pginer-WMF.

Since T106997 was merged with this task, I'm adding the request that if the nowiki tags are added, they should be added just around the two apostrophes, not around a big chunk of wikitext as it has been done in this edit.

Jdforrester-WMF lowered the priority of this task from Medium to Lowest.Jul 28 2015, 7:15 PM
Jdforrester-WMF moved this task from To Triage to Freezer on the VisualEditor board.

Since T106997 was merged with this task, I'm adding the request that if the nowiki tags are added, they should be added just around the two apostrophes, not around a big chunk of wikitext as it has been done in this edit.

Should be fixed as part of https://gerrit.wikimedia.org/r/#/c/227481/ (which is getting deployed today). However, please alert us if you notice scenarios where multiple nowikis could have been merged into a single nowiki around a longer string.

@ssastry I don't think that patch necessarily takes care of all these cases. There's also another path through constrained texts where they're introduced.

This really seems like something VE should be handling for us. We don't need to be adding complexity to Parsoid to handle what is fundamentally a typing error on the user's side. Adding <nowiki>s just makes the bad thing slightly less bad; VE is the place where the markup can actually be made *good*.

This really seems like something VE should be handling for us. We don't need to be adding complexity to Parsoid to handle what is fundamentally a typing error on the user's side. Adding <nowiki>s just makes the bad thing slightly less bad; VE is the place where the markup can actually be made *good*.

I agree.

What's the bug here? I see a bubble after typing '' on en.wiki and he.wiki.

What's the bug here? I see a bubble after typing '' on en.wiki and he.wiki.

Heh. Curious. Now I do see it. Maybe it was broken when I created the task?

In any case, I am more and more inclined to wanting to auto-correct it from '' to " while typing. From my analysis, the people who do it are usually not experienced, but new users who never experienced wikitext, so a bubble that talks about wikitext is not very useful to them.

However, please alert us if you notice scenarios where multiple nowikis could have been merged into a single nowiki around a longer string.

@ssastry, I've created T108009 that shows this type of problem

Extra point, in the neapolitan project in order to go faster when typewriting code I use to handle the double '' as a... &#39;' ... and I write literally &#39;' each time...

this produces the same effect as the nowikis wrapping the ''

however as far as I am finding more and more neapolitan literature with clear separation between apostrophes I am tending to use a space between them. However I think some workaround must be achieved, if you think my &#39;' proposal is useful, please go for it.

Regards,

For Neapolitan, there could probably be another rule that would not put &#39;' into <nowiki>, but if modern Neapolitan orthography suggests a space between the apostrophes, simply using this would happen to be a very lucky solution to this problem :)

Perfect :)

I would say yes, in most of the cases modern neapolitan in literature suggests space between apostrophes... and/or the use of the typographic apostrophe ( ’ ) rather than the typewriter (') apostrophe.

My only concern is to make it in a way in which the contributors are not disencouraged by warnings or alerts, but proposed to put a space or changing it to the typographic apostrophes.

It would certainly be possible to override this warning in the site's common.js. You'd need to create a new command based on MWWikitextWarningCommand then override the wikitextItalic sequence in MWSequenceRegistry to point to your new command.

I just added a gadget on Polish Wikipedia (https://pl.wikipedia.org/wiki/MediaWiki:Gadget-veAutocorrect.js), currently opt-in, that implements autocorrection from '' to / (the right kind of curly quotes for Polish), based on @Schnark's work at https://de.wikipedia.org/wiki/Benutzer:Schnark/js/veAutocorrect.js.

Unwanted <nowiki> tags and line spacing are also generated when pasting wiki text in the Visual editor using Google Chrome Control-Shift-V (paste without formatting).

How to avoid:

  • in the Visual editor, paste formatted (plain Control-v)
  • first switch to the tag editor before pasting with Control-Shift-V (paste unformatted)

Another issue was typing a #REDIRECT [[xxx]] in the tag editor that generated <nowiki>#</nowiki>REDIRECT [[xxx]] (obvisouly wrong) when the code was immediately saved.