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

Diff view loses the right hand side alignment done by using tab when tokenize method has options with markWord("\t", "tab", "") #223

Open
sharadkalya opened this issue Aug 5, 2024 · 1 comment

Comments

@sharadkalya
Copy link

When the library replaces the tab character to replace it with content, it loses the actual tab when rendering. And therfore the right hand side is not aligned correctly.

tokenize(hunks, {
    ....
    markWord("\t", "tab", ""),
});

Without tab options passed
Screenshot from 2024-08-05 12-11-57

With tab options passed
Screenshot from 2024-08-05 12-11-45

@otakustay
Copy link
Owner

By markWord("\t", "tab", "") you are replace \t into an empty string, try markWord("\t", "tab", "\t"), it may works, if not, any further discussion is welcome

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

2 participants