Skip to content

Commit 89c4201

Browse files
committed
plugins/sql: fix doc formatting for tables with multiple indices.
Before vs after: - `forwards` indexed by `in_channel and in_htlc_id` (see lightning-listforwards(7)) - `forwards` indexed by `in_channel` and `in_htlc_id` (see lightning-listforwards(7)) And: - `htlcs` indexed by `short_channel_id and id` (see lightning-listhtlcs(7)) - `htlcs` indexed by `short_channel_id` and `id` (see lightning-listhtlcs(7)) Signed-off-by: Rusty Russell <[email protected]>
1 parent de5e4fe commit 89c4201

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugins/sql.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1581,16 +1581,16 @@ static const char *fmt_indexes(const tal_t *ctx, const char *table)
15811581
assert(!ret);
15821582
BUILD_ASSERT(ARRAY_SIZE(indices[i].fields) == 2);
15831583
if (indices[i].fields[1])
1584-
ret = tal_fmt(tmpctx, "%s and %s",
1584+
ret = tal_fmt(tmpctx, "`%s` and `%s`",
15851585
indices[i].fields[0],
15861586
indices[i].fields[1]);
15871587
else
1588-
ret = tal_fmt(tmpctx, "%s",
1588+
ret = tal_fmt(tmpctx, "`%s`",
15891589
indices[i].fields[0]);
15901590
}
15911591
if (!ret)
15921592
return "";
1593-
return tal_fmt(ctx, " indexed by `%s`", ret);
1593+
return tal_fmt(ctx, " indexed by %s", ret);
15941594
}
15951595

15961596
static const char *json_prefix(const tal_t *ctx,

0 commit comments

Comments
 (0)