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

Normalize Markdown syntax #3

Open
nichtich opened this issue Aug 11, 2012 · 2 comments
Open

Normalize Markdown syntax #3

nichtich opened this issue Aug 11, 2012 · 2 comments

Comments

@nichtich
Copy link

Mardown allows for alternative syntax variants, for instance how to create headings, lists, whitespace, etc. Unless we agree on one normalized form, there will be many forms of exactely the same document, leading to different forms of diffs and commits that only origin from changes in markdown syntax. Luckily there is an easy method to normalize via pandoc:

pandoc -f markdown -t markdown index.md

With normalization one can also create a hash of the actual text instead of a hash of one particular form of the text.

See also issue #4 to remove metadata from the laws (right now the metadata is interpreted as markdown table).

@stefanw
Copy link
Member

stefanw commented Aug 11, 2012

Good idea. Ideally the Markdown will be generated from the XML in canonical format. But the XML contains style changes like inserted line breaks etc. that could lead to unnecessary changes. Something like normalizing too many line breaks is definitely nice.

@darkdragon-001
Copy link
Collaborator

Maybe we should agree on some Markdown source format. Are the original line breaks important for the laws?
If not, what about putting every sentence in a separate line in the markdown file. This way, diffs are reproducible and can still be rendered according to the viewer size.

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

3 participants