4 ms·
- But doesn't plain text suck for difs? + But doesn't plain text suck for diffs? - Especially when you have a really long, multi-line - paragraph t
by squiggleblaz 7y ago
- But doesn't plain text suck for difs?
+ But doesn't plain text suck for diffs?
- Especially when you have a really long, multi-line
- paragraph that has bmore than one change? And if we
- relied on word wrap, then the scope of change would
- be the paragraph and all hope is lost. At least
- this way we might eventually regain some
+ Especially when you have an exceptionally long,
+ multi-line paragraph that has more than one change?
+ But if we relied on word wrap, then the scope of
+ change would be the paragraph and all hope is lost.
+ At least this way we might eventually regain some
equivalency by chance and it's clear that nothing
after that point has changed.
Git is great, but it's designed for code. Legal documents are probably structured more like code than any other prose with clear identified chunks and frequently breaking out into lists, but it's not the same thing.
(For clarity, I think probably a sentence-by-sentence diff would work well. But then it's not plain text; you're relying on some processor to collect sentences into paragraphs.)
- ultraism 7y agoDon't use plaintext, use LaTeX. Since paragraphs are separated by an empty line, you can have each sentence on a separate in a paragraph on a separate line and have it still formatted as a paragraph in the final document. This allows for better diffs. Here is an example: https://github.com/dart-lang/language/blob/master/specification/dartLangSpec.tex#L355 https://github.com/dart-lang/language/blob/master/specificat...
- dragonwriter 7y ago> Don't use plaintext, use LaTeX Markdown or Asciidoc has the same benefit as far as paragraphs.
- ultraism 7y agoMarkdown doesn't address table of contents or references which were mentioned above.
- dragonwriter 7y agoAsciidoc does, and there are TOC tools for markdown, though they are add-ons to markdown processors.
- azernik 7y agoThe diff algorithm/display is orthogonal to the data format; for example, I use the --color-words option to the git tools to use a word-oriented diff everywhere. I've even seen plugins floating around online for visual image diffs in git! But again, all those tools are built for developers, and especially the ones used by git for internal purposes like for conflict resolution make some strong assumptions that don't hold for prose.