From 00d25c95ddd258adf23ee8d335abf43a943a893d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 8 Dec 2025 06:46:51 +0000 Subject: [PATCH] Add ignore for `path-substitutions` in `include` directive I am the author of [`sphinx-substitution-extensions`](https://github.com/adamtheturtle/sphinx-substitution-extensions). This enables substitutions in existing Sphinx / docutils directives by adding new options. There is already an ignore in this project for `code-block` (just above the added ignore). I wish to add support for `include` to my extension, at https://github.com/adamtheturtle/sphinx-substitution-extensions/pull/1265, but there is a conflict with `doc8`. --- src/doc8/checks.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/doc8/checks.py b/src/doc8/checks.py index 2b6870f..e25dc73 100644 --- a/src/doc8/checks.py +++ b/src/doc8/checks.py @@ -118,6 +118,10 @@ class CheckValidity(ContentCheck): r'^Error in \"code-block\" directive\:\nunknown option: "substitutions".', re.MULTILINE, ), + re.compile( + r'^Error in \"include\" directive\:\nunknown option: "path-substitutions".', + re.MULTILINE, + ), re.compile( r'^PEP number must be a number from 0 to 9999; "\d{1,4}#[^"]*" is invalid.', ),