Comments (12)
Hi @rmpestano , apparently I broke it with the last fix.
The parser was missing a test for binary files.
Will release a fix soon.
from diff2html.
great 👍
from diff2html.
@rmpestano released as version [email protected]
from diff2html.
Its working great now, thank you very much!
from diff2html.
Hi again @rtfpessoa,
Although it is working I'm getting the following javascript error (only when there are binary diffs):
Failed to parse lines, starting in 0!startBlock @ diff2html-2.0.0-rc.9.min.js:3
Attached a zip containing a sample.
from diff2html.
That is "expected" behaviour.
If I cannot find @@ ........ @@
I log that error.
Maybe I can log it only If the line starts with @
and ignore it there is no such line, like in binary files.
from diff2html.
@rmpestano just did a quick fix for the binary files.
BTW, also released major version 2.0.0
after the first fix (for more than a month to do it).
So this fix is in [email protected]
.
from diff2html.
@rtfpessoa, working without errors now, thank you again 👍
from diff2html.
@rtfpessoa is there a flag to ignore binary files? seems to be a good usecase.
from diff2html.
@rahulnjs can you provide more context about your use case?
You can do that when generating the diff, or you can even do:
- Parse diff string to json using diff2html
- Filter binary files from the json
- Generate html using diff2html with the filtered json
In general I think it would be too simple to do outside, cannot find a good use case to bundle that.
Let me know if you have more information.
from diff2html.
@rtfpessoa I understand your point.
But when diff2html is already doing so much wouldn't it be nice to filter it during parsing or even during html generation. Which would save me all the 3 steps you have mentioned. So the code remains clean.
All I have to pass is,
{
ignoreBinary : true | false
}
Thanks.
from diff2html.
@rahulnjs when you say:
when diff2html is already doing so much
I am not sure what you really mean.
Today diff2html only does parsing of diffs and html generation. At most you can configure some important features of each of these features.
If we start adding too many unrelated features it will easily get bloated and over-complicated.
I think what you are requesting is mostly a feature of the diff generation, since it makes no sense to generate it for files that you are not interested to see.
Sorry to be too persistent but I really would like to avoid getting to many things in here.
from diff2html.
Related Issues (20)
- Output of diff not preserving escaped HTML characters HOT 3
- Can't run diff2html-cli on linux docker container HOT 2
- Make templates more flexible HOT 4
- How to remove the serial number of blank lines HOT 3
- Blank context lines are ignored by diff parser HOT 1
- Vertical align mismatch between inserted/deleted text and matching
- Code breaking when there is no change in a line HOT 3
- Is it possible to generate single html report for multiple git repos? HOT 1
- Unknown argument: diff.txt HOT 1
- 12341
- If the diffString contains special symbols, the page will report an error HOT 1
- Diff2html fails with Error: Cannot find module 'tslib'
- Slim version doesn't fallback to 'plaintext' on unsupported file type HOT 4
- File list links are not working in Angular integration for diff2html-ui HOT 2
- CSS not working inside shadow DOM
- Feature request: option to only show first n files HOT 3
- when execute git diff --word-diff-regex=. ,diff2html is not work HOT 1
- how to make `diff2html` display line breaks for line-by-line view ?? HOT 1
- Backslashes removed in title e.g. C:\dev\alex\test.json -> C:devalex.json HOT 1
- Problems with multiline code blocks highlighted incorrectly HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diff2html.