Documentation fails to build due to invalid JSON example
When I am building Kea from master I am getting this error:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/sphinx/cmd/build.py", line 276, in build_main
app.build(args.force_all, filenames)
File "/usr/local/lib/python3.9/site-packages/sphinx/application.py", line 324, in build
self.builder.build_all()
File "/usr/local/lib/python3.9/site-packages/sphinx/builders/__init__.py", line 250, in build_all
self.build(None, summary=__('all source files'), method='all')
File "/usr/local/lib/python3.9/site-packages/sphinx/builders/__init__.py", line 350, in build
self.write(docnames, list(updated_docnames), method)
File "/usr/local/lib/python3.9/site-packages/sphinx/builders/__init__.py", line 524, in write
self._write_serial(sorted(docnames))
File "/usr/local/lib/python3.9/site-packages/sphinx/builders/__init__.py", line 534, in _write_serial
self.write_doc(docname, doctree)
File "/usr/local/Cellar/python@3.9/3.9.18/Frameworks/Python.framework/Versions/3.9/lib/python3.9/contextlib.py", line 126, in __exit__
next(self.gen)
File "/usr/local/lib/python3.9/site-packages/sphinx/util/logging.py", line 217, in pending_warnings
memhandler.flushTo(logger)
File "/usr/local/lib/python3.9/site-packages/sphinx/util/logging.py", line 182, in flushTo
logger.handle(record)
File "/usr/local/Cellar/python@3.9/3.9.18/Frameworks/Python.framework/Versions/3.9/lib/python3.9/logging/__init__.py", line 1599, in handle
self.callHandlers(record)
File "/usr/local/Cellar/python@3.9/3.9.18/Frameworks/Python.framework/Versions/3.9/lib/python3.9/logging/__init__.py", line 1661, in callHandlers
hdlr.handle(record)
File "/usr/local/Cellar/python@3.9/3.9.18/Frameworks/Python.framework/Versions/3.9/lib/python3.9/logging/__init__.py", line 948, in handle
rv = self.filter(record)
File "/usr/local/Cellar/python@3.9/3.9.18/Frameworks/Python.framework/Versions/3.9/lib/python3.9/logging/__init__.py", line 806, in filter
result = f.filter(record)
File "/usr/local/lib/python3.9/site-packages/sphinx/util/logging.py", line 425, in filter
raise exc
sphinx.errors.SphinxWarning: /Users/marcin/devel/kea/doc/sphinx/arm/hooks.rst:402:Could not lex literal_block as "json". Highlighting skipped.
Warning, treated as error:
/Users/marcin/devel/kea/doc/sphinx/arm/hooks.rst:402:Could not lex literal_block as "json". Highlighting skipped
The following patch eliminates the issue:
diff --git a/doc/sphinx/arm/hooks.rst b/doc/sphinx/arm/hooks.rst
index 31fa3ab9b3..3613fa9f3d 100644
--- a/doc/sphinx/arm/hooks.rst
+++ b/doc/sphinx/arm/hooks.rst
@@ -403,7 +403,6 @@ It lowers the number of concurrently parked packets to 128.
{
"Dhcp6": {
- // Limit the number of concurrently parked packets to 128.
"parked-packet-limit": 128
"hooks-libraries": [
{
@@ -432,7 +431,7 @@ It lowers the number of concurrently parked packets to 128.
]
}
}
- ],
+ ]
}
}