Page MenuHomePhabricator

Parsoid/VisualEditor sometimes inserts `|<nowiki>-</nowiki>` instead of `| -` into tables
Open, LowPublic0 Estimated Story Points

Description

Visual editor sometimes inserts <nowiki>-</nowiki> instead of - into tables.

See an example at this diff. The user wanted to insert a hyphen into a table cell. Using | - would be valid wiki syntax, but instead it inserts |<nowiki>-</nowiki>.

When I try to reproduce it myself, I get | -, which is good, but I often see |<nowiki>-</nowiki> instead.

Event Timeline

IMHO it's debatable which variant should be preferred: While | - is more concise, |<nowiki>-</nowiki> shows you even at the first glance that it is a literal hyphen, and not part of the table syntax.

IMHO it's debatable which variant should be preferred: While | - is more concise, |<nowiki>-</nowiki> shows you even at the first glance that it is a literal hyphen, and not part of the table syntax.

@Schnark's argument has merit but I know the hewiki tries to avoid all nowikis. Would be good to have confirmed guidance about what is better that is acceptable across wikis. I would think nowiki would be better simply because of its explicitness and a signal for future editors who might otherwise be confused (even if momentarily) by the space.

@Schnark's argument has merit but I know the hewiki tries to avoid all nowikis.

Please don't conflate one deeply troubled editor (myself) for the whole hewiki :)

Two years ago another hewiki editors commented about <nowiki>s in VE edits as one reason for not using it more, so I started looking more deeply and somehow couldn't stop. That's it, it's not a big pan-community thing.

Would be good to have confirmed guidance about what is better that is acceptable across wikis. I would think nowiki would be better simply because of its explicitness and a signal for future editors who might otherwise be confused (even if momentarily) by the space.

Even before we're talking what is better for the users, I'd love to know what is defined as the right behavior for the software. It never happened in my own edits, and every time I try to edit, I see | -, but in other people's edits I often see |<nowiki>-</nowiki> and I wonder what are the conditions for each of them.

@Schnark's argument has merit but I know the hewiki tries to avoid all nowikis.

Please don't conflate one deeply troubled editor (myself) for the whole hewiki :)

Two years ago another hewiki editors commented about <nowiki>s in VE edits as one reason for not using it more, so I started looking more deeply and somehow couldn't stop. That's it, it's not a big pan-community thing.

Sorry, my mistake! Thanks for clarifying.

Would be good to have confirmed guidance about what is better that is acceptable across wikis. I would think nowiki would be better simply because of its explicitness and a signal for future editors who might otherwise be confused (even if momentarily) by the space.

Even before we're talking what is better for the users, I'd love to know what is defined as the right behavior for the software. It never happened in my own edits, and every time I try to edit, I see | -, but in other people's edits I often see |<nowiki>-</nowiki> and I wonder what are the conditions for each of them.

Hmm .. looks like this functionality was added to Parsoid as part of T93116 ... so, looks like Parsoid is already implementing the ' ' behavior .. but looks like some edge case is preventing it from triggering it in that particular scenario.

Jdforrester-WMF renamed this task from Visual editor sometimes inserts `|<nowiki>-</nowiki>` instead of `| -` into tables to Parsoid/VisualEditor sometimes inserts `|<nowiki>-</nowiki>` instead of `| -` into tables.Jun 13 2017, 5:28 PM
Jdforrester-WMF set the point value for this task to 0.