Skip to content

docs: fix warning about matrix.json not valid for code highlighting #793

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

Merged

Conversation

NeroBurner
Copy link

Fixing the following warning:

Warning, treated as error:
hunter/docs/creating-new/test/ci.rst:84:Could not lex literal_block as "JSON". Highlighting skipped.

The referenced codeblock is the following:

.. literalinclude:: ../../../.github/workflows/ci/matrix.json
  :language: JSON

The matrix.json file contains // comments, which are not valid json tripping the highlighting.

Removing the :language: JSON part fixes this warning

Fixes: #790

Fixing the following warning:
```sh
Warning, treated as error:
hunter/docs/creating-new/test/ci.rst:84:Could not lex literal_block as "JSON". Highlighting skipped.
```

The referenced codeblock is the following:

```rst
.. literalinclude:: ../../../.github/workflows/ci/matrix.json
  :language: JSON
```

The `matrix.json` file contains `//` comments, which are not valid json tripping the highlighting.

Removing the `:language: JSON` part fixes this warning

Fixes: cpp-pm#790
@NeroBurner NeroBurner self-assigned this Jun 10, 2025
@NeroBurner NeroBurner added the documentation Improvements or additions to documentation label Jun 10, 2025
@NeroBurner
Copy link
Author

misspelled error moved to new issue: #794

@NeroBurner NeroBurner merged commit 792b26d into cpp-pm:master Jun 10, 2025
1 check failed
@NeroBurner NeroBurner deleted the docs_matrix_json_not_valid_json branch June 10, 2025 12:44
@NeroBurner
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

doc: matrix.json not valid JSON causing warning/error
1 participant