Mixed spaces and tabs in indentions

Open
#142 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
28/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript
Domain
frontend, web-dev

Research direction

No file, test, or entry point is named. Start by reproducing the issue in the online editor with pasted code containing a tab followed by spaces in an indent, then compare the resulting indentation with the code run on the micro:bit. Done should mean this input no longer produces invalid indentation, but the intended normalization behavior is not specified.

Written by the indexing model from the issue text.

Description

enhancement

Here's a situation the results in a mix of tabs and spaces in an indent - disastrous.

There's source code somewhere outside the editor (maybe web page, maybe a text editor) that includes a tab followed by spaces within an indent of a line. Copying and pasting that code into the online editor doesn't result in the space being converted; in fact, it seems an even stranger mix of spaces and tabs results in that line's indent. Although the code still appears fine on screen (in online editor), it won't work properly on the micro:bit.

Dominant language
JavaScript
Stars
201
Forks
126
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bbcmicrobit/PythonEditor

All issues in bbcmicrobit/PythonEditor

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.