Re:US Constitution – A Git repo with history of edits
by ultraism on Thursday October 24, 2019 @01:21PM
(#21346846)
Don'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/specificat...
Re:US Constitution – A Git repo with history of edits
by dragonwriter on Thursday October 24, 2019 @01:26PM
(#21346903)
> Don't use plaintext, use LaTeX
Markdown or Asciidoc has the same benefit as far as paragraphs.
Re:US Constitution – A Git repo with history of edits
by ultraism on Thursday October 24, 2019 @02:20PM
(#21347522)
Markdown doesn't address table of contents or references which were mentioned above.
Re:US Constitution – A Git repo with history of edits
by dragonwriter on Thursday October 24, 2019 @02:49PM
(#21347880)
Asciidoc does, and there are TOC tools for markdown, though they are add-ons to markdown processors.
Re:US Constitution – A Git repo with history of edits
by azernik on Saturday October 26, 2019 @06:54AM
(#21362985)
The 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.
(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.)