Page MenuHomePhabricator

Code from MediaWiki:Base.js removes the linebreak before "|-", breaking table on Wikisource
Open, Needs TriagePublic


Steps to reproduce

  1. Open s:pt:Page:Elementos de Arithmetica.djvu/302 in edit mode
  2. Replace the attribute {| width=100% by the CSS equivalent {| style="width: 100%;"
  3. Save the page

Actual result
The line breaks before the code |- disappear, breaking the table syntax.

Expected result
Only the first line is changed, and the table syntax is still correct.

I tested with Firefox, with JavaScript enabled, and was unable to revert to the working version.

Event Timeline

He7d3r created this task.Jan 9 2016, 8:44 PM
He7d3r raised the priority of this task from to Needs Triage.
He7d3r updated the task description. (Show Details)
He7d3r added a subscriber: He7d3r.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptJan 9 2016, 8:44 PM
GOIII added a subscriber: GOIII.EditedJan 10 2016, 2:35 AM

@He7d3r stop using the "dumbed down" Easy LST feature (uses number symbol scheme - # foo # ) in place of the normal section tag implementation.

just add self.proofreadpage_raw_lst = true; to your common.js file to disable something that should not have been universally enabled site-wide to begin with (in my humble opinion that is). See MediaWiki:Base.js specifically.

I was easily able to fix your circular faux rendering on preview vs. save problem after disabling Easy LST.

He7d3r renamed this task from MediaWiki removes automatically the linebreak before "|-", breaking table on Wikisource to Code from MediaWiki:Base.js removes the linebreak before "|-", breaking table on Wikisource.Jan 10 2016, 5:29 PM
He7d3r updated the task description. (Show Details)
He7d3r set Security to None.
AuFCL added a subscriber: AuFCL.Jan 19 2016, 12:05 AM
This comment was removed by AuFCL.
AuFCL added a comment.Jan 19 2016, 3:13 AM

Prior comment removed. Good intentions but further discussion reveals proposed patch answers wrong question.

(No real need to remove comments - they can be edited instead. :)

AuFCL added a comment.Jan 20 2016, 8:32 PM

Thanks Andre for the good advice. I removed the comment as subsequent discussion with @GOIII pointed up the fact that technically "solving" this involves a political/expectation aspect I had not considered.

Function easy_lst() (either version: both the one buried within MediaWiki:Base.js OR the standalone Easy_LST gadget) contain checks for very specific wikicode sequences (notably "{|" and "----") adjacent to <section> tags along with some rather sloppy regex coding. Looks to have been developed incrementally solving case-by-case situations rather than generically, so "fixing" any specific issue really risks becoming more an exercise in expectation control rather than clean cut improvement.

Having a comprehensive list of test cases (and also T39230) would help with this kind of update.

AuFCL removed a subscriber: AuFCL.Nov 21 2016, 7:33 PM