Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pasted tab character is rendered as 8 characters long in codeblock #2330

Closed
Perkolator opened this issue Jan 21, 2020 · 0 comments · Fixed by #2446
Closed

Pasted tab character is rendered as 8 characters long in codeblock #2330

Perkolator opened this issue Jan 21, 2020 · 0 comments · Fixed by #2446
Labels
bug It's a bug

Comments

@Perkolator
Copy link
Contributor

Environment

Joplin version: 1.0.178
Platform: Windows
OS specifics: Windows 8.1(.1)

Steps To Reproduce

  1. Paste text that has tab character(s), from some other editor to a codeblock in Joplin.

= Joplin rendered view shows 1 tab char as 8 characters long in the codeblock.

Describe what you expected to happen:

The rendered view should show a tab char exactly the same length (but do not convert to spaces) as when a tab key is pressed in Joplin (inserts 4 space chars, not a tab char). The 8 characters long indentation becomes a problem when inserting code that has nested indentations.


Here's a link to a text file that can be used for this test: Paste code test.txt

Few pictures:

Paste code test - notepad2

Paste code test - rendered

@Perkolator Perkolator added the bug It's a bug label Jan 21, 2020
laurent22 pushed a commit that referenced this issue Feb 5, 2020
* Add renderer plugin to handle tabs in code blocks.

* Add plugin to renderer package list.

* Attempt to fix unrelated linter issues.

* Fix unrelated linter problems.

The problems exist on master prior to the branch.

* Fix more inherited linter problems.
@lock lock bot locked and limited conversation to collaborators Feb 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug It's a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant