From 2ac29c2edd5351045dedd0c6d2115f41bf217f18 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 20 Feb 2026 07:05:04 +0530 Subject: [PATCH] Fix errors from new version of sphinx about misaligned tables --- manual/regexp_quick_reference.rst | 98 ++++++++++++++----------------- 1 file changed, 43 insertions(+), 55 deletions(-) diff --git a/manual/regexp_quick_reference.rst b/manual/regexp_quick_reference.rst index ab20364feb..d84cc9761f 100644 --- a/manual/regexp_quick_reference.rst +++ b/manual/regexp_quick_reference.rst @@ -17,28 +17,28 @@ succinctly. Examples: -+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| **Representation** | **Class** | -| | | -+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ``[a-z]`` | Lowercase letters. Does not include characters with accent mark and ligatures | -| | | -+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ``[a-z0-9]`` | Lowercase letters from a to z or numbers from 0 to 9 | -| | | -+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ``[A-Za-z-]`` | Uppercase or lowercase letters, or a dash. To include the dash in a class, you must put it at the beginning or at the end so as not to confuse it with the hyphen that specifies a range of characters | -| | | -+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ``[^0-9]`` | Any character except a digit. The caret (^) placed at the beginning of the class excludes the characters of the class (complemented class) | -| | | -+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ``[[a-z]--[aeiouy]]`` | The lowercase consonants. A class can be included in a class. The characters ``--`` exclude what follows them | -| | | -+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ``[\w--[\d_]]`` | All letters (including foreign accented characters). Abbreviated classes can be used inside a class | -| | | -+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-----------------------+-----------------------------------------------------------------------------+ +| **Representation** | **Class** | +| | | ++-----------------------+-----------------------------------------------------------------------------+ +| ``[a-z]`` | Lowercase letters. Does not include characters with accent mark and | +| | ligatures | ++-----------------------+-----------------------------------------------------------------------------+ +| ``[a-z0-9]`` | Lowercase letters from a to z or numbers from 0 to 9 | ++-----------------------+-----------------------------------------------------------------------------+ +| ``[A-Za-z-]`` | Uppercase or lowercase letters, or a dash. To include the dash in a class, | +| | you must put it at the beginning or at the end so as not to confuse it | +| | with the hyphen that specifies a range of characters | ++-----------------------+-----------------------------------------------------------------------------+ +| ``[^0-9]`` | Any character except a digit. The caret (^) placed at the beginning of the | +| | class excludes the characters of the class (complemented class) | ++-----------------------+-----------------------------------------------------------------------------+ +| ``[[a-z]--[aeiouy]]`` | The lowercase consonants. A class can be included in a class. The | +| | characters ``--`` exclude what follows them | ++-----------------------+-----------------------------------------------------------------------------+ +| ``[\w--[\d_]]`` | All letters (including foreign accented characters). Abbreviated classes | +| | can be used inside a class | ++-----------------------+-----------------------------------------------------------------------------+ Example:: @@ -48,31 +48,26 @@ Example:: Shorthand character classes --------------------------- -+---------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| **Representation** | **Class** | -| | | -+---------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| ``\d`` | A digit (same as ``[0-9]``) | -| | | -+---------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| ``\D`` | Any non-numeric character (same as ``[^0-9]``) | -| | | -+---------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| ``\w`` | An alphanumeric character (``[a-zA-Z0-9]``) including characters with accent mark and ligatures | -| | | -+---------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| ``\W`` | Any “non-word” character | -| | | -+---------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| ``\s`` | Space, non-breaking space, tab, carriage return | -| | | -+---------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| ``\S`` | Any “non-whitespace” character | -| | | -+---------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| ``.`` | Any character except newline. Use the “dot all” checkbox or the ``(?s)`` regexp modifier to include the newline character. | -| | | -+---------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ ++---------------------+-------------------------------------------------------------------------------+ +| **Representation** | **Class** | +| | | ++---------------------+-------------------------------------------------------------------------------+ +| ``\d`` | A digit (same as ``[0-9]``) | ++---------------------+-------------------------------------------------------------------------------+ +| ``\D`` | Any non-numeric character (same as ``[^0-9]``) | ++---------------------+-------------------------------------------------------------------------------+ +| ``\w`` | An alphanumeric character (``[a-zA-Z0-9]``) including characters with accent | +| | mark and ligatures | ++---------------------+-------------------------------------------------------------------------------+ +| ``\W`` | Any “non-word” character | ++---------------------+-------------------------------------------------------------------------------+ +| ``\s`` | Space, non-breaking space, tab, carriage return | ++---------------------+-------------------------------------------------------------------------------+ +| ``\S`` | Any “non-whitespace” character | ++---------------------+-------------------------------------------------------------------------------+ +| ``.`` | Any character except newline. Use the “dot all” checkbox or the ``(?s)`` | +| | regexp modifier to include the newline character. | ++---------------------+-------------------------------------------------------------------------------+ The quantifiers --------------- @@ -82,25 +77,18 @@ The quantifiers | | | +----------------+---------------------------------------------------------------------------+ | ``?`` | 0 or 1 occurrence of the expression. Same as ``{0,1}`` | -| | | +----------------+---------------------------------------------------------------------------+ | ``+`` | 1 or more occurrences of the expression. Same as ``{1,}`` | -| | | +----------------+---------------------------------------------------------------------------+ | ``*`` | 0, 1 or more occurrences of the expression. Same as ``{0,}`` | -| | | +----------------+---------------------------------------------------------------------------+ | ``{n}`` | Exactly n occurrences of the expression | -| | | +----------------+---------------------------------------------------------------------------+ | ``{min,max}`` | Number of occurrences between the minimum and maximum values included | -| | | +----------------+---------------------------------------------------------------------------+ -| ``{min,}`` | Number of occurrences between the minimum value included and infinity | -| | | +| ``{min,}`` | Number of occurrences between the minimum value included and infinity | +----------------+---------------------------------------------------------------------------+ | ``{,max}`` | Number of occurrences between 0 and the maximum value included | -| | | +----------------+---------------------------------------------------------------------------+