From d8832da9b57a5d818dab0ab231ab11d59fac7d19 Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Mon, 23 Sep 2024 19:53:24 +0100 Subject: [PATCH] [std.format] Add anchors for section headings --- std/format/package.d | 12 ++++++------ std/format/write.d | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/std/format/package.d b/std/format/package.d index a78e1b3d0dc..e02c1202a4b 100644 --- a/std/format/package.d +++ b/std/format/package.d @@ -60,7 +60,7 @@ Limitation: This package does not support localization, but adheres to the rounding mode of the floating point unit, if available. -$(SECTION3 Format Strings) +$(H3 $(LNAME2 format-strings, Format Strings)) The functions contained in this package use $(I format strings). A format string describes the layout of another string for reading or @@ -144,7 +144,7 @@ recommended to assign (lower- and uppercase) letters. Note: The $(I Parameters) of a $(I CompoundIndicator) are currently limited to a $(B '-') flag. -$(SECTION4 Format Indicator) +$(H4 $(LNAME2 format-indicator, Format Indicator)) The $(I format indicator) can either be a single character or an expression surrounded by $(B %\() and $(B %\)). It specifies the @@ -205,7 +205,7 @@ Note: Inside a $(I compound indicator), strings and characters are escaped automatically. To avoid this behavior, use `"%-$(LPAREN)"` instead of `"%$(LPAREN)"`. -$(SECTION4 Flags) +$(H4 $(LNAME2 flags, Flags)) There are several flags that affect the outcome of the formatting. @@ -244,7 +244,7 @@ $(BOOKTABLE , sections below for more information.)) ) -$(SECTION4 Width$(COMMA) Precision and Separator) +$(H4 $(LNAME2 width-precision-separator, Width, Precision and Separator)) The $(I width) parameter specifies the minimum width of the result. @@ -269,7 +269,7 @@ The $(I separator) can also be followed by a $(B '?'). In that case, an additional argument is used to specify the symbol that should be used to separate the chunks. -$(SECTION4 Position) +$(H4 $(LNAME2 position, Position)) By default, the arguments are processed in the provided order. With the $(I position) parameter it is possible to address arguments @@ -282,7 +282,7 @@ It's also possible to use positional arguments for $(I width), $(I precision) and $(I separator) by adding a number and a $(B '$(DOLLAR)') after the $(B '*'). -$(SECTION4 Types) +$(H4 $(LNAME2 types, Types)) This section describes the result of combining types with format characters. It is organized in 2 subsections: a list of general diff --git a/std/format/write.d b/std/format/write.d index 2aa45d724b5..078fa786e76 100644 --- a/std/format/write.d +++ b/std/format/write.d @@ -28,7 +28,7 @@ $(TR $(TD $(I delegates)) $(TD yes) $(TD $(MDASH)) $(TD $(MDASH)) $(TD $(MDASH)) Enums can be used with all format characters of the base type. -$(SECTION3 Structs$(COMMA) Unions$(COMMA) Classes$(COMMA) and Interfaces) +$(H3 $(LNAME2 aggregates, Structs, Unions, Classes, and Interfaces)) Aggregate types can define various `toString` functions. If this function takes a $(REF_ALTTEXT FormatSpec, FormatSpec, std, format,