From 84089c7368a6e49674a09d2f5e8f14d26a54db75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Fri, 11 Aug 2023 17:35:32 +0200 Subject: [PATCH] [docs] add note about 'path-restrict' implementation https://github.com/mikf/gallery-dl/issues/146#issuecomment-1671892152 --- docs/configuration.rst | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/configuration.rst b/docs/configuration.rst index e8cd714c..ce174ab4 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -222,8 +222,15 @@ Description * ``"ascii"``: ``"^0-9A-Za-z_."`` (only ASCII digits, letters, underscores, and dots) * ``"ascii+"``: ``"^0-9@-[\\]-{ #-)+-.;=!}~"`` (all ASCII characters except the ones not allowed by Windows) - Note: In a string with 2 or more characters, ``[]^-\`` need to be - escaped with backslashes, e.g. ``"\\[\\]"`` + Implementation Detail: For ``strings`` with length >= 2, this option uses a + `Regular Expression Character Set `__, + meaning that: + + * using a caret ``^`` as first character inverts the set + * character ranges are supported (``0-9a-z``) + * ``]``, ``-``, and ``\`` need to be escaped as + ``\\]``, ``\\-``, and ``\\\\`` respectively + to use them as literal characters extractor.*.path-replace