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

The tab size is not displayed well.(white-space: pre) #1012

Open
jeffrey-flo opened this issue Aug 31, 2023 · 3 comments
Open

The tab size is not displayed well.(white-space: pre) #1012

jeffrey-flo opened this issue Aug 31, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@jeffrey-flo
Copy link

jeffrey-flo commented Aug 31, 2023

Steps to Reproduce

HTML

it's included 2 tab (4 space + 4 space)
0x09 0x09 0x31 0x32 0x33 0x34

<p>		1234</p><p>1234</p>
`HtmlWidget` configuration
HtmlWidget(
        text,
        customStylesBuilder: (e) {
          switch (e.localName) {
            case 'p':
              return {'margin': '0', 'white-space': 'pre', 'tab-size': '4'};
            case 'ol':
              return {'margin': '-2px 0px 0px 4px'};
            // top, right, bottom, left
          }
          return null;
        },
)
Tesing environment

Expected results

image

Actual results

image
@jeffrey-flo jeffrey-flo added the bug Something isn't working label Aug 31, 2023
@daohoangson
Copy link
Owner

Which version of this package are you using?

@jeffrey-flo
Copy link
Author

@daohoangson
Now I'm using 0.10.4
Thanks :)

@daohoangson daohoangson added enhancement New feature or request and removed bug Something isn't working labels Sep 6, 2023
@daohoangson
Copy link
Owner

Apparently Flutter's RichText renders tab character with the same width as a space character. This package doesn't support the inline styling tab-size yet so it's working as expected for now. I'm replacing the label for this issue with enhancement to be implemented later.

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

No branches or pull requests

2 participants