lightning/tools
Matt Whitlock 968bb63739 doc: properly handle ``preformatted blocks``
Lowdown requires a blank line before all preformatted blocks, or it doesn't
recognize them. `tools/md2man.sh` contained some ad-hoc efforts at fixing up
some locations where these required blank lines are absent from the output of
`tools/fromschema.py`, but it missed some. Instead of playing Whack-a-Mole, use
a blanket sed expression to ensure that a blank line precedes _every_ opening
```.

`esc_underscores(…)` in `tools/fromschema.py` did not work correctly on strings
containing an odd number of backticks, notably the ``` delimiters surrounding
preformatted text blocks. Specifically, it was dropping the last backtick since
none of the alternatives in the regex matched it. Add a new alternative that
matches a whole preformatted block as a single unit.

`output_member(…)` in `tools/fromschema.py` was passing each line of a member's
description through `esc_underscores(…)` individually, but that breaks
preformatted text blocks that are naturally multi-line and leads to mistakenly
escaping underscores inside such blocks. Rewrite the code to make use of the
`outputs(…)` utility function that joins all the provided lines together before
passing the whole text through `esc_underscores(…)`.

Drive-by fix a couple of flubbed preformatted blocks in schemas.

[ Added shellcheck suppression for md2man.sh --RR ]
Changelog-None
2025-05-15 16:06:08 +09:30
..
gen Enable Length-Prefixed TLVs through Generator 2025-02-22 11:51:54 -06:00
test tools: remove DEVELOPER. 2023-09-21 20:08:24 +09:30
.gitignore reorganize .gitignore entries across subdirs. 2021-05-18 09:43:50 +09:30
bench-gossipd.sh devtools/gossipwith: use timestamp filter message not obsolete INIT_ROUTING_SYNC. 2024-06-19 15:54:24 +09:30
build-release.sh tools: Create config.vars before ./configure 2025-03-05 18:25:24 -06:00
check-bolt.c tools/check-bolt: rewrite to give more accurate diagnostics when we're out of sync. 2024-06-19 15:54:24 +09:30
check-includes.sh tools/check-includes.sh: make shellcheck happy. 2021-12-06 10:05:39 +10:30
check-manpage.sh lightningd: add --developer runtime option. 2023-09-21 20:08:24 +09:30
check-release.sh build: Release build automation ([#7776]). 2024-12-03 11:56:23 +10:30
check-setup_locale.sh setup: add setup to make checks 2020-05-19 13:35:42 +09:30
check-spelling.sh tools: allow spelling of HtlcTlv 2024-05-17 16:30:43 +02:00
docker-entrypoint.sh Docker: run directory for post-start if present. 2023-03-23 16:43:07 +10:30
fromschema.py doc: properly handle ``preformatted blocks`` 2025-05-15 16:06:08 +09:30
generate-wire.py hsmd: rename simple_htlc to hsm_htlc, don't gratuitously dynamically allocate. 2025-05-06 12:27:53 +09:30
headerversions.c tools/headerversions.c: fix build without SQLite 2024-11-19 09:48:31 +10:30
hsmtool.c tools: Add testnet4 support for reckless and hsmtool 2025-01-13 15:45:19 -08:00
Makefile make: Change mv to mv -f when replacing tools/headerversions file 2024-10-14 15:00:36 +10:30
md2man.sh doc: properly handle ``preformatted blocks`` 2025-05-15 16:06:08 +09:30
mockup.sh update-mocks: handle missing deprecated_apis. 2022-07-09 09:59:52 +09:30
reckless reckless: don't update a plugin if a specific tag was previously installed 2025-05-14 13:02:03 +09:30
refresh-submodules.sh make: have git submodule update be recursive 2020-12-11 13:20:54 +01:00
repro-build.sh ci: Fix for reproducible noble build failure 2025-01-30 09:34:01 +10:30
update-mocks.sh tools: make sure we don't use optimization when building mocks. 2023-10-23 15:48:50 +10:30