6 Commits (main)

Author SHA1 Message Date
Endo bfa8363f8c Merged ghost sections without title while preserving `role=restriction*`
When exporting the DocBook template to Markdown or PDF (there might be more cases in formats not tested), Pandoc still includes a section into the exported format even when it doesn't have a title.

In the Markdown files, this means added lines `##` in-between ```Any use by a business that is privately owned and managed, and that seeks to generate profit from the labor of employees paid by salary or other wages, is not permitted under this license.``` and ```You may exercise the rights granted in the license grant for any purposes only if:```.

When the license doesn't strip out elements with `role=restriction-attribution` (for the no-attribution licenses), there's another empty section title between ```You do not use the Work to either Discriminate or spread Hate Speech on the basis of sex, sexual orientation, gender identity, race, age, disability, color, national origin, religion, caste, or lower economic status.``` and ```If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made by any Licensor to remove credit from a Collection or Adaptation, keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing:```

This is an issue when exporting the Markdown license files to PDFs, because these ghost sections will be visible in the outline viewer of a PDF reader. Might also be a potential issue if users want to generate a table of contents or index along with their PDF — it might put these ghost section in, too.

To fix this, DocBook doesn't have a special "ghost section" type (closest is a `<bridgehead>`, but that completely screws over formatting), so the contents of the ghost sections were merged into its parent with the `role` of the ghost section in mind.

Output was sanity-tested with these commands:
```sh
$ xml ed -d "/article/info" template.xml | xml ed -d "*/*/*[@role='restriction']" | pandoc -f docbook -t markdown -s -o test-modified.md
$ xml ed -d "/article/info" template-original.xml | xml ed -d "*/*/*[@role='restriction']" | pandoc -f docbook -t markdown -s -o test-original.md
$ diff test-original.md test-modified.md
215,216d214
< ## 
<``` `template-original.xml` is the file from this branch's last commit, c706fa6efc5ecd7217342fa5f7e23fdc613fb07b.
2 years ago
Endo 43901c4dd1 Fixed XML indentation in the Restrictions section 2 years ago
Endo 927d9dee20 Fix for thufie/npl-builder#5
Definition for Source Code now reads: `Source Code is the human-readable form of Software through which the Original Author and/or Distributor originally created, derived, and/or modified it.`

Signed-off-by: Endo <endo@noreply.git.pixie.town>
2 years ago
thufie f0c4a285b9 fixed typos pointed out in #3
This was a funny typo from refactoring into npl-builder.
2 years ago
thufie 2eef20e50f found a missing space 3 years ago
Thufie 87ba3c0fee initial commit 3 years ago