wpilibsuite / sphinxext-opengraph

Sphinx extension to generate unique OpenGraph metadata
https://sphinxext-opengraph.readthedocs.io
Other
74 stars 27 forks source link

Skipping code blocks and fixing docs build. #47

Closed Robpol86 closed 2 years ago

Robpol86 commented 2 years ago

While working on another PR I ran into this bug on my test website. I had a test document with only an HTML code block and found out unescaped HTML was added to the meta tag:

<meta property="og:description" content="<meta property="og:image" content="_images/normal.jpg" /> <img alt="_images/normal.jpg" src="_images/normal.jpg" />" />
<meta property="og:image" content="_images/normal.jpg" />

Fixing this by skipping literal blocks.

Also fixed docs build. I was getting the exception: AttributeError: 'Values' object has no attribute 'section_self_link'

This was caused by https://github.com/sphinx-doc/sphinx/issues/9825. Updating dependencies fixed the issue.