From af7020c9eccd3468848345b11c680f4451d93b74 Mon Sep 17 00:00:00 2001 From: "Alexey O. Shigarov" Date: Wed, 26 Aug 2026 15:32:22 +0800 Subject: [PATCH] docs(rtl): make the extractor table say what NORM and TRIM do The RTL reference described `TRIM` as "Trim" -- a tautology -- and `NORM` as "Collapse whitespace", which is incomplete: norm_whitespace strips the edges too, so NORM is strictly stronger than TRIM rather than orthogonal to it. Both rows now match the wording docs/model/atp.md already used for the same extractors, and the "only" in TRIM's row carries the contrast. This table is also the source of the rtl-lsp hover dictionary (vscode-rtl/tools/gen_hover_data.py harvests it), so the extension showed "TRIM -> Trim" as its tooltip. Regenerating there now yields something useful; that regeneration belongs to the vscode-rtl side. Deliberately not cross-referencing the delimited specification here: TRIM applies to any atom, and it is the "Semantics of S_delim" section that points at the extractor, not the other way round. Also fixes an in-page link added in 0.5.0: the anchor for "Atomic -- contSpec" is `#atomic-contspec` under mkdocs, not the GitHub-style `#atomic--contspec` carried over from the jRegTab wording. `mkdocs build --strict` reported it as an unresolved anchor. No behaviour change; documentation only. Co-Authored-By: Claude Opus 5 (1M context) --- docs/rtl-reference.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/rtl-reference.md b/docs/rtl-reference.md index 0fc404e..53a3dfa 100644 --- a/docs/rtl-reference.md +++ b/docs/rtl-reference.md @@ -268,10 +268,10 @@ VAL: (COL&#'H'*, ROW&#'S'*)->REC // collect tagged headers into the record | Extractor | Effect | |---|---| -| `NORM` | Collapse whitespace | +| `NORM` | Trim + collapse internal whitespace | | `UC` | To upper case | | `LC` | To lower case | -| `TRIM` | Trim | +| `TRIM` | Strip leading/trailing whitespace only | | `SUBSTR(n,m)` | Substring starting at position *n*, length *m* | | `REPL("a","b")` | Replace *a* with *b* (Java regex) | @@ -320,7 +320,7 @@ same way an atomic or compound cell receives its raw text: This matches `pandas.Series.str.split`, which makes patterns over exploded columns expressible without post-processing. -To trim, ask for it — add a [string extractor](#atomic--contspec) to the delimited atom. +To trim, ask for it — add a [string extractor](#atomic-contspec) to the delimited atom. It is applied to each token separately: ```rtl