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

How tabs are expanded to spaces? I'm confused. #74

Closed
appsubscribe opened this issue Sep 5, 2014 · 3 comments
Closed

How tabs are expanded to spaces? I'm confused. #74

appsubscribe opened this issue Sep 5, 2014 · 3 comments

Comments

@appsubscribe
Copy link

The spec states that "Tabs in lines are expanded to spaces, with a tab stop of 4 characters". But when I look at the html result. The first tab only got 1 space?

foo→baz→→bim    |  <p>foo baz     bim</p>
@cebe
Copy link
Contributor

cebe commented Sep 5, 2014

The second two tabs also are 5 characters of whitespace.
Looks like it is not to convert each tab into 4 spaces but convert tabs with tab stop of 4 characters.
So the first tab ends after 4 characters, the second ends after 8 and the last after 12 chars.

@appsubscribe
Copy link
Author

Thank you @cebe, I got it now :)

@hayd
Copy link

hayd commented Mar 14, 2015

The wording in the spec is still confusing (at least to me). Though I get it now, if it helps someone else:

"1\t22\t333\t4444\t5" becomes "1   22  333 4444    5"

It would be great to elaborate this aspect of the spec (not sure if there is a better wording though).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants