https://bugzilla.wikimedia.org/show_bug.cgi?id=54141

       Web browser: ---
            Bug ID: 54141
           Summary: CodeEditor: change to using tabs breaks existing Lua
                    module indentation
           Product: MediaWiki extensions
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Unprioritized
         Component: CodeEditor
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified
   Mobile Platform: ---

As a result of bug 39616, CodeEditor has switched from indenting using four
spaces to indenting using tabs. This is a problem when editing existing Lua
modules, because with the default settings it creates an unholy mixture of tabs
and spaces. See for example this change:

Permanent link:
https://en.wikipedia.org/w/index.php?title=Module:User:Mr._Stradivarius/whitespacebug&oldid=572981484
Diff:
https://en.wikipedia.org/w/index.php?title=Module%3AUser%3AMr._Stradivarius%2Fwhitespacebug&action=view&diff=572981484

Note the indentation level of the tab before "local ret = ''", and the mix of
tabs and spaces before "ret = ret .. '*' .. v .. '\n'".

This change is extra-nasty because when typing in text, CodeEditor behaves
exactly as it previously did, except now it is inserting tabs instead of groups
of four spaces. In addition, when deleting existing groups of four spaces,
editors are now required to hit backspace four times rather than just once.

Probably the answer is to set pages in the module namespace to use four spaces,
and other pages to use tabs. Going through and changing all the existing module
code to use tabs for indentation would require some skillful bot work and a big
hit to the job queue.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to