summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2026-06-02 11:10:15 +0200
committerHiFiPhile <[email protected]>2026-06-02 11:30:33 +0200
commit22c2ece872262c1331482f8e80881ab1f5f36c0b (patch)
tree1c664033a71d9d5ee47866c0504631af23b80025
parent64af21f930db48f4dfbe8c0d4c4cb0fabf839ca6 (diff)
try to get render right
Signed-off-by: HiFiPhile <[email protected]>
-rw-r--r--README.rst8
-rwxr-xr-xdocs/conf.py19
2 files changed, 23 insertions, 4 deletions
diff --git a/README.rst b/README.rst
index fac098c1c..ecfbeb7cc 100644
--- a/README.rst
+++ b/README.rst
@@ -251,7 +251,7 @@ Supported CPUs
| | +-------------------+--------+------+-----------+------------------------+-----------------------------------------------------------------------------------------+
| | | 51u | ✔ | ✖ | ✖ | lpc_ip3511 | |
| | +-------------------+--------+------+-----------+------------------------+-----------------------------------------------------------------------------------------+
-| | | 54 | ⚠ | ⚠ | ✔ | lpc_ip3511, lpc_ip3516 | `NRND, read errata <docs/reference/device_issues.rst#nxp-lpc54600>`_ |
+| | | 54 | ⚠ | ⚠ | ✔ | lpc_ip3511, lpc_ip3516 | `NRND, read errata <docs/reference/device_issues.rst#nxp-lpc54600>`_ |
| | +-------------------+--------+------+-----------+------------------------+-----------------------------------------------------------------------------------------+
| | | 55 | ✔ | ✔ | ✔ | lpc_ip3511, lpc_ip3516 | |
| +---------+-------------------+--------+------+-----------+------------------------+-----------------------------------------------------------------------------------------+
@@ -305,11 +305,11 @@ Supported CPUs
+--------------+-----------------------------+--------+------+-----------+------------------------+-----------------------------------------------------------------------------------------+
| ValentyUSB | eptri | ✔ | ✖ | ✖ | eptri | |
+--------------+-----------------------------+--------+------+-----------+------------------------+-----------------------------------------------------------------------------------------+
-| WCH | CH32F20x | ⚠ | | ✔ | ch32_usbhs | `ISO data loss <docs/reference/device_issues.rst#wch-ch32v10x-ch32v20x-ch32v30x>`_ |
+| WCH | CH32F20x | ⚠ | | ✔ | ch32_usbhs | `ISO data loss <docs/reference/device_issues.rst#wch-ch32v10x-ch32v20x-ch32v30x>`_ |
| +-----------------------------+--------+------+-----------+------------------------+-----------------------------------------------------------------------------------------+
-| | CH32V20x | ⚠ | | ✖ | stm32_fsdev/ch32_usbfs | `ISO data loss <docs/reference/device_issues.rst#wch-ch32v10x-ch32v20x-ch32v30x>`_ |
+| | CH32V20x | ⚠ | | ✖ | stm32_fsdev/ch32_usbfs | `ISO data loss <docs/reference/device_issues.rst#wch-ch32v10x-ch32v20x-ch32v30x>`_ |
| +-----------------------------+--------+------+-----------+------------------------+-----------------------------------------------------------------------------------------+
-| | CH32V305, CH32V307 | ⚠ | | ✔ | ch32_usbfs/hs | `ISO data loss <docs/reference/device_issues.rst#wch-ch32v10x-ch32v20x-ch32v30x>`_ |
+| | CH32V305, CH32V307 | ⚠ | | ✔ | ch32_usbfs/hs | `ISO data loss <docs/reference/device_issues.rst#wch-ch32v10x-ch32v20x-ch32v30x>`_ |
+--------------+-----------------------------+--------+------+-----------+------------------------+-----------------------------------------------------------------------------------------+
Table Legend
diff --git a/docs/conf.py b/docs/conf.py
index 9e9784fb7..86ddcf672 100755
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -53,6 +53,25 @@ def preprocess_readme():
tgt = Path(__file__).parent.parent / "README_processed.rst"
if src.exists():
content = src.read_text(encoding='utf-8')
+ # if the matching is inside a table, keep the table cell width by adding the same number of spaces in the end of the line
+ # match pattern: | ... `... <docs/...>`_ ... |
+ # change into: | ... `... <...>`_ ... |
+ def _rewrite_table_line(line):
+ if not (line.startswith('|') and line.rstrip().endswith('|')):
+ return line
+
+ rewritten = re.sub(r"<docs/([^>]+)>", r"<\1>", line)
+ delta = len(line) - len(rewritten) - 1 # -1 for rst->html
+
+ if delta > 0:
+ last_pipe = rewritten.rfind('|')
+ if last_pipe >= 0:
+ rewritten = rewritten[:last_pipe] + (' ' * delta) + rewritten[last_pipe:]
+
+ return rewritten
+
+ content = ''.join(_rewrite_table_line(line) for line in content.splitlines(keepends=True))
+
content = re.sub(r"docs/", r"", content)
content = re.sub(r"\.rst\b", r".html", content)
if not content.endswith("\n"):