-
Notifications
You must be signed in to change notification settings - Fork 399
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
🐛 Vue SFC syntax highlighting does not work if opening tag is not included in diff #1546
Comments
Closing - this was because in my delta config I had overrode the foreground colors for Great tool! |
Reopening as I am in fact having some issues still with Vue SFC - both in JS and CSS.. will update as I can, just tracking for now... |
bat
output
related: #162 Unsure if a similar workaround is available for Vue SFC |
If I set the context to something huge like 200 then it highlights correctly as it manages to include the opening tag for script, style, etc. However this makes the diffs not very useful. It would be nice to have something like what bat must be doing where it parses the whole file and then displays the small section of it, although I realize this is relying on diff output |
Hi @pm0u, I think this is a dup of #117, right? There is an easy-sounding fix that a couple of people have suggested and which someone should implement: add a |
I think that would do it, yes. Although providing an arbitrary number could be challenging (or I would likely just pass a giant number like 99999) since the boundaries of different parts of the file would be hard to predict. In this case, something like a full file option could be more succint but either would work. |
Right, but, this is out of delta's control. It is git that is generating the diff, and so it is git that controls how much context is supplied to delta. AFAIK git just offers
so yes, passing a "large" integer is how we'd use it. E.g.
|
Ah gotcha, it wasn't clear to me who was interpreting the flag in question. So then I assume the |
Edit: see #1546 (comment)
When diffing Vue SFC files, delta does not properly syntax highlight - even when the diff is a syntax complete file.
bat for the same file
The text was updated successfully, but these errors were encountered: