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

Sanitize doc generation, pt. 2 #14646

Open
wants to merge 30 commits into
base: master
Choose a base branch
from

Conversation

nobodywasishere
Copy link
Contributor

This is a follow up to #13786, making libxml2 an optional compile-time dependency, fixing the issues with the previous PR (that had to be reverted #14595).

LibXML2 (and by proxy doc sanitization) can be enabled via the libxml2=1 make flag:

make libxml2=1

A warning is printed when building docs without this flag set, informing the user that doc sanitization is disabled:

❯ make docs
Using /opt/homebrew/opt/llvm/bin/llvm-config [version=18.1.6]
./bin/crystal docs src/docs_main.cr  --project-name=Crystal --project-version=1.13.0-dev --source-refname=8a01443aa
Using compiled compiler at .build/crystal
Crystal built without LibXML2 support, documentation sanitization disabled
cp -av doc/ docs/
doc/ -> docs
doc//assets -> docs/assets
doc//assets/crystal-born-and-raised.svg -> docs/assets/crystal-born-and-raised.svg

straight-shoota and others added 30 commits May 20, 2020 01:18
libxml2 2.9.13 changed behaviour of parsing a bare `<` character
https://gitlab.gnome.org/GNOME/libxml2/-/issues/339
…398b'

git-subtree-dir: lib/sanitize
git-subtree-mainline: fa91f99
git-subtree-split: 75c141b
Doing so will enable doc generation sanitization
With it disabled, a warning is printed to STDERR when generating docs
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

Successfully merging this pull request may close these issues.

None yet

2 participants