diff --git a/docs/extensions/mrdocs-demos.js b/docs/extensions/mrdocs-demos.js index 822060967d..57a8d266b6 100644 --- a/docs/extensions/mrdocs-demos.js +++ b/docs/extensions/mrdocs-demos.js @@ -143,10 +143,9 @@ module.exports = function (registry) { } } - // Remove HTML and Rendered Asciidoc from the list of formats - // - The HTML generator is unmaintained + // Remove Rendered Asciidoc from the list of formats // - The raw Asciidoc is already rendered by the mrdocs.com server as HTML - versionFormats = versionFormats.filter(format => format !== 'html' && format !== 'adoc-asciidoc'); + versionFormats = versionFormats.filter(format => format !== 'adoc-asciidoc'); let multipageFormats = versionFormats.filter(format => format !== 'xml'); let versionFormatColumns = versionFormats.map(format => `*${humanizeFormat(format)}*`).join(' | '); @@ -183,12 +182,23 @@ module.exports = function (registry) { return '/reference.adoc' } } + if (format === 'html') + { + if (pageType === 'multi') + { + return '/index.html' + } + else { + return '/reference.html' + } + } return ''; })() - if (['adoc', 'xml'].includes(format)) { + if (['adoc', 'xml', 'html'].includes(format)) { const adoc_icon = 'https://avatars.githubusercontent.com/u/3137042?s=200&v=4' + const html_icon = 'https://raw.githubusercontent.com/FortAwesome/Font-Awesome/refs/heads/6.x/svgs/brands/html5.svg' const code_file_icon = 'https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/solid/file-code.svg' - const icon = format === 'adoc' ? adoc_icon : code_file_icon + const icon = format === 'adoc' ? adoc_icon : format === 'html' ? html_icon : code_file_icon text += `| image:${icon}[${humanizeLibrary(library)} reference in ${humanizeFormat(format)} format,width=16,height=16,link=${demoUrlWithSuffix},window=_blank]` } else { text += `| ${demoUrlWithSuffix}[🔗,window=_blank]` diff --git a/docs/extra/generator_front.py b/docs/extra/generator_front.py new file mode 100644 index 0000000000..28dfac309d --- /dev/null +++ b/docs/extra/generator_front.py @@ -0,0 +1,82 @@ +import matplotlib.pyplot as plt +import os + +# Data points for formats (Redundancy, Convenience) +formats = { + "Clang AST": (0.9, 0.0), # High redundancy, low convenience + "XML": (0, 0.1), # Slightly more redundancy and convenience + "Asciidoc": (0.8, 0.8), # Higher convenience, higher redundancy + "HTML": (0.9, 1.0), # Most convenient, slightly more redundant + "Custom Templates": (0.5, 0.6), # Most convenient, slightly more redundant +} + +# Hypothetical solutions behind the Pareto front +hypotheticals = [(0.4, 0.05), (0.45, 0.05), (0.7, 0.2), (0.9, 0.45), (1, 0.35)] + +# Plotting +plt.figure(figsize=(8, 6)) + + +def calculate_pareto_front(data_points): + # Sort data points by the x-coordinate + data_points.sort() + + # Calculate the Pareto front + pareto_front = [] + max_y = float('-inf') + for x, y in data_points: + if y > max_y: + pareto_front.append((x, y)) + max_y = y + + # Create stairs for the Pareto front + min_x = min(data_points, key=lambda x: x[0])[0] + max_x = max(data_points, key=lambda x: x[0])[0] + min_y = min(data_points, key=lambda x: x[1])[1] + max_y = max(data_points, key=lambda x: x[1])[1] + stairs_x = [min_x] + stairs_y = [min_y] + for i in range(len(pareto_front) - 1): + stairs_x.extend([pareto_front[i][0], pareto_front[i + 1][0]]) + stairs_y.extend([pareto_front[i][1], pareto_front[i][1]]) + stairs_x.append(pareto_front[-1][0]) + stairs_y.append(pareto_front[-1][1]) + stairs_x.append(max_x) + stairs_y.append(max_y) + + return stairs_x, stairs_y + + +data_points = list(formats.values()) + hypotheticals +pareto_x, pareto_y = calculate_pareto_front(data_points) +plt.plot(pareto_x, pareto_y, linestyle="--", color="gray", label="Best Trade-offs") + +# Hypothetical solutions +x_hyp, y_hyp = zip(*hypotheticals) +plt.scatter(x_hyp, y_hyp, color="gray", alpha=0.5, label="Hypothetical") + +for label, (x, y) in formats.items(): + plt.scatter(x, y, s=100) + plt.annotate(label, (x, y), textcoords="offset points", xytext=(5, 5), ha='center') + +# The ideal solution +plt.scatter(0, 1, color="gray", alpha=0.5) +plt.annotate("Ideal", (0, 1), textcoords="offset points", xytext=(5, 5), ha='center') + +# Labels and Legend +plt.xlabel("Redundancy") +plt.ylabel("Convenience") +plt.title("Output Formats") +plt.legend() +plt.grid(True) +plt.xticks([]) +plt.yticks([]) + +# Get the directory of the script +script_dir = os.path.dirname(__file__) + +# Construct the target path +target_path = os.path.join(script_dir, '../modules/ROOT/images/generator_front.svg') + +# Save the plot to the target path +plt.savefig(target_path) \ No newline at end of file diff --git a/docs/modules/ROOT/images/generator_front.svg b/docs/modules/ROOT/images/generator_front.svg new file mode 100644 index 0000000000..ae92befb22 --- /dev/null +++ b/docs/modules/ROOT/images/generator_front.svg @@ -0,0 +1,1066 @@ + + + + + + + + 2024-11-26T15:12:28.577883 + image/svg+xml + + + Matplotlib v3.9.2, https://matplotlib.org/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/modules/ROOT/pages/contribute.adoc b/docs/modules/ROOT/pages/contribute.adoc index 3d4cd01f19..919d462da1 100644 --- a/docs/modules/ROOT/pages/contribute.adoc +++ b/docs/modules/ROOT/pages/contribute.adoc @@ -7,18 +7,7 @@ It is intended to provide an overview of the codebase and the process of adding The MrDocs codebase is divided into several modules: -[mermaid] -.... -graph TD - CL[Command Line Arguments] --> P - CF[Configuration File] --> P - P[Options] --> E - P --> CD - P --> G - CD[Compilation Database] --> E - E[Extract Symbols] -->|Corpus| G - G[Generator] --> D(Documentation) -.... +include::partial$workflow.adoc[] This section provides an overview of each module and how they interact with each other in the MrDocs codebase. diff --git a/docs/modules/ROOT/pages/generators.adoc b/docs/modules/ROOT/pages/generators.adoc index 4d83848303..e2c436b058 100644 --- a/docs/modules/ROOT/pages/generators.adoc +++ b/docs/modules/ROOT/pages/generators.adoc @@ -1,6 +1,7 @@ = Generators -MrDocs uses a generator to convert the extracted symbols into documentation. MrDocs supports multiple output formats that can be specified via the `generate` option: +MrDocs uses a generator to convert the extracted symbols into documentation. +MrDocs supports multiple output formats that can be specified via the `generate` option: The `generate` option can be used to specify the output format: @@ -28,42 +29,83 @@ Three output formats are supported: The corpus of symbols is provided to the generator responsible for converting these symbols into the desired output format. -The `xml` generator is used as an intermediary format for other tools or for testing purposes. Users can write their own tools to process the XML output and generate custom documentation. +The `xml` generator is used as an intermediary format for other tools or for testing purposes. +Users can write their own tools to process the XML output and generate custom documentation. -The `adoc` and `html` generators use templates to generate the documentation. These templates can be customized to change the output format and style. +The `adoc` and `html` generators use templates to generate the documentation. +These templates can be customized to change the output format and style. -Asciidoc is a text-based format that is easy to read and write. It can also be converted to other formats such as HTML and Markdown. +Asciidoc is a text-based format that is easy to read and write. +It can also be converted to other formats such as HTML and Markdown. HTML can be generated directly with the `html` format. +== Choosing the Right Generator + +The scatter plot below illustrates the available output formats for MrDocs, along with hypothetical solutions, in terms of **redundancy** and **convenience**. + +image::generator_front.svg[Output Formats Scatter Plot,width=600] + +- **Redundancy**: The amount of duplicated or unstructured information in the output format. +Lower redundancy is generally preferred for post-processing, while higher redundancy can allow the output to use formats that are easier to use directly. +- **Convenience**: Reflects how readily the output format can be used without requiring additional tools or steps. + +Although Clang can generate and print an Abstract Syntax Tree (AST) directly for a Translation Unit (TU), it is not the most convenient format for generating documentation: + +- It does not provide the AST in a format that's easy to process. +- Equivalent symbols can be redeclared multiple times in the same translation unit and across translation units. +- The documentation for equivalent symbols also needs to be unified. + +The scatter plot shows the following output formats supported by MrDocs: + +1. **XML**: Aggregates all symbols and their documentation in a format that is straightforward to process. +It's suitable for advanced use cases involving custom post-processing tools. +2. **Asciidoc**: Similar to HTML in convenience, Asciidoc files can be easily converted to HTML and multiple other formats with https://docs.asciidoctor.org/asciidoctor/latest/convert/available/:[backends]. +3. **HTML**: Generates output that is directly usable in a variety of contexts, such as web pages or documentation systems. + +The Asciidoc and HTML generators also support <> to change the output format and style. +This forms another possibility in the trade-off between redundancy and convenience. + +The best trade-offs, represented by the line passing through the generators, indicate the optimal solutions in terms of redundancy and convenience. +Solutions on this line balance these goals effectively. +Dots in the background represent other potential formats that do not lie on the front of best trade-offs, as they fail to optimize either redundancy or convenience compared to the available generators. + +[#generator-templates] == Generator Templates -MrDocs attempts to support various alternatives for customizing the output format and style without complex workflows to post-process XML output. The `adoc` and `html` generators use https://handlebarsjs.com/[Handlebars,window=_blank] templates. These templates can be customized to change the output format and style of the documentation. +MrDocs attempts to support various alternatives for customizing the output format and style without complex workflows to post-process XML output. +The `adoc` and `html` generators use https://handlebarsjs.com/[Handlebars,window=_blank] templates. +These templates can be customized to change the output format and style of the documentation. -The templates used to generate the documentation are located in the `share/mrdocs/addons/generator` directory. Users can create a copy of these files and provide their own `addons` directory via the `addons` option in the configuration file or via the command line. +The templates used to generate the documentation are located in the `share/mrdocs/addons/generator` directory. +Users can create a copy of these files and provide their own `addons` directory via the `addons` option in the configuration file or via the command line. [source,yaml] ---- addons: /path/to/custom/addons ---- -Each symbol goes through a main layout template in the `/generator//layouts/single-symbol..hbs` directory. This template is a simple entry point that renders the partial relative to the symbol kind. +Each symbol goes through a main layout template in the `/generator//layouts/single-symbol..hbs` directory. +This template is a simple entry point that renders the partial relative to the symbol kind. -The partials are located in the `/generator//partials` directory. It contains the following subdirectories: +The partials are located in the `/generator//partials` directory. +It contains the following subdirectories: -* `symbols`: Contains one partial for each symbol kind. The fields of each symbol object are described in the <> section. +* `symbols`: Contains one partial for each symbol kind. +The fields of each symbol object are described in the <> section. * `signature`: Contains one partial for each symbol kind that renders the signature of the symbol as if declared in {cpp}. -* `types`: partials for rendering other types of objects in a canonical form. Please refer to the <> for more information on each type of object. +* `types`: partials for rendering other types of objects in a canonical form. +Please refer to the <> for more information on each type of object. * `markup`: partials for rendering markup elements such as lists, tables, and code blocks, in the output format. -Partials common to all generators are available in the `/generator/common/partials` directory. The common partials are loaded before the generator-specific partials, which can override any common partials. +Partials common to all generators are available in the `/generator/common/partials` directory. +The common partials are loaded before the generator-specific partials, which can override any common partials. -The multipage generator renders the layout multiple times as separate pages for each symbol. The single-page generator renders the layout multiple times and concatenates the results in a single page. +The multipage generator renders the layout multiple times as separate pages for each symbol. +The single-page generator renders the layout multiple times and concatenates the results in a single page. -Each time the generator encounters a symbol, -it renders the layout template with the symbol data as the Handlebars context. -The layout template can include other partial templates -to render the symbol data.These partials are available in the `/generator//partials` directory. +Each time the generator encounters a symbol, it renders the layout template with the symbol data as the Handlebars context. +The layout template can include other partial templates to render the symbol data.These partials are available in the `/generator//partials` directory. The Document Object Model (DOM) for each symbol includes all information about the symbol.One advantage of custom templates over post-processing XML files is the ability to access symbols as a graph.If symbol `A` refers to symbol `B`, some properties of symbol `B` are likely to be required in the documentation of `A`.All templates and generators can access a reference to `B` by searching the symbol tree or simply by accessing the elements `A` refers to.All references to other symbols are resolved in the templates. @@ -146,7 +188,8 @@ Handlebars generators extend each symbol with the following fields: |=== -The `Symbol` object has additional properties based on the kind of symbol. The following table lists the additional properties for symbols that contain information about their scope (such as Namespaces and Classes): +The `Symbol` object has additional properties based on the kind of symbol. +The following table lists the additional properties for symbols that contain information about their scope (such as Namespaces and Classes): |=== |Property |Type| Description @@ -531,7 +574,8 @@ When the symbol kind is `concept`, the symbol object has the following additiona [#source-info-fields] === Source Info Fields -The `Source Info` object represents the location of the symbol in the source code. The source info object has the following properties: +The `Source Info` object represents the location of the symbol in the source code. +The source info object has the following properties: |=== |Property |Type| Description @@ -548,7 +592,8 @@ The `Source Info` object represents the location of the symbol in the source cod [#tranche-fields] === Tranche Object Fields -The `Tranche` object represents the symbols in a scope (e.g., namespace). The tranche object has the following properties: +The `Tranche` object represents the symbols in a scope (e.g., namespace). +The tranche object has the following properties: |=== |Property |Type| Description @@ -577,7 +622,8 @@ The `Tranche` object represents the symbols in a scope (e.g., namespace). The tr [#interface-fields] === Interface Object Fields -The `Interface` object represents the interface of a record (e.g., class, struct, union). The interface object has the following properties: +The `Interface` object represents the interface of a record (e.g., class, struct, union). +The interface object has the following properties: |=== |Property |Type| Description @@ -598,7 +644,8 @@ The `Interface` object represents the interface of a record (e.g., class, struct [#base-info-fields] === Base Info Fields -The `Base Info` object represents a base class of a record. The base info object has the following properties: +The `Base Info` object represents a base class of a record. +The base info object has the following properties: |=== |Property |Type| Description @@ -619,7 +666,8 @@ The `Base Info` object represents a base class of a record. The base info object [#template-info-fields] === Template Info Fields -The `Template Info` object represents the template information of a record, function, or typedef. The template info object has the following properties: +The `Template Info` object represents the template information of a record, function, or typedef. +The template info object has the following properties: |=== |Property |Type| Description @@ -648,7 +696,8 @@ The `Template Info` object represents the template information of a record, func [#type-info-fields] === Type Info Fields -The `Type Info` object represents the type information of a symbol. The type info object has the following properties: +The `Type Info` object represents the type information of a symbol. +The type info object has the following properties: |=== |Property |Type| Description @@ -725,7 +774,8 @@ The `Type Info` object represents the type information of a symbol. The type inf [#param-fields] === Param Fields -The `Param` object represents the parameter of a function. The param object has the following properties: +The `Param` object represents the parameter of a function. +The param object has the following properties: |=== |Property |Type| Description @@ -746,7 +796,8 @@ The `Param` object represents the parameter of a function. The param object has [#name-info-fields] === Name Info Fields -The `Name Info` object represents the name of a symbol. The name info object has the following properties: +The `Name Info` object represents the name of a symbol. +The name info object has the following properties: |=== |Property |Type| Description @@ -771,7 +822,8 @@ The `Name Info` object represents the name of a symbol. The name info object has [#location-fields] === Location Fields -The `Location` object represents the location of a symbol in the source code. The location object has the following properties: +The `Location` object represents the location of a symbol in the source code. +The location object has the following properties: |=== |Property |Type| Description @@ -800,7 +852,8 @@ The `Location` object represents the location of a symbol in the source code. Th [#tparam-fields] === TParam Fields -The `TParam` object represents a template parameter of a record, function, or typedef. The tparam object has the following properties: +The `TParam` object represents a template parameter of a record, function, or typedef. +The tparam object has the following properties: |=== |Property |Type| Description @@ -841,7 +894,8 @@ The `TParam` object represents a template parameter of a record, function, or ty [#targ-fields] === Targ Fields -The `Targ` object represents a template argument of a record, function, or typedef. The targ object has the following properties: +The `Targ` object represents a template argument of a record, function, or typedef. +The targ object has the following properties: |=== |Property |Type| Description @@ -874,4 +928,6 @@ The `Targ` object represents a template argument of a record, function, or typed [#config-fields] === Config Fields -The `Config` object represents the configuration object. It includes all values provided to MrDocs in the configuration file or via the command line. Please refer to the xref:config-file.adoc[configuration file reference] for more information. +The `Config` object represents the configuration object. +It includes all values provided to MrDocs in the configuration file or via the command line. +Please refer to the xref:config-file.adoc[configuration file reference] for more information. diff --git a/docs/modules/ROOT/pages/usage.adoc b/docs/modules/ROOT/pages/usage.adoc index 4f6eb27d9d..401ca939f5 100644 --- a/docs/modules/ROOT/pages/usage.adoc +++ b/docs/modules/ROOT/pages/usage.adoc @@ -1,5 +1,25 @@ = Basic Usage +The diagram below illustrates the workflow of the MrDocs documentation tool. +It shows how inputs are transformed step by step into the final documentation output. +Each component in the diagram represents a distinct type of entity: + +- **Inputs**: Provide the initial parameters and settings required to configure and run the tool. +These include the <> and <>. +- **Processes**: Represent intermediary outputs or data generated during the workflow. +- **Outputs**: The final product, in this case, the generated documentation. + +include::partial$workflow.adoc[] + +In summary: + +* Begin by specifying the <> and <> to set up the options. The configuration options affect all processes. +* The configuration options define a <>. All symbols are extracted with Clang to generate a unified corpus of symbols with their corresponding xref:page$commands.adoc[documentation]. +* Finally, This corpus is then fed to a xref:page$generators.adoc[Generator] that produces the desired documentation. + +For more details on each component, refer to the corresponding sections of this guide. + +[#config-file] == MrDocs configuration file The `mrdocs.yml` configuration file contains information about the project. @@ -30,6 +50,7 @@ The most important information is the `source-root` option, which determines the The list of all available options can be found in the xref:config-file.adoc[] page. +[#cli] == MrDocs invocation NOTE: For consistency, these instructions assume you have the `mrdocs` executable in PATH. @@ -59,6 +80,7 @@ mrdocs path/to/mrdocs.yml --output=../docs/reference NOTE: Except for the path to the `mrdocs.yml` file, all other relative paths are made absolute relative to the `mrdocs.yml` file. +[#compilation-database] === Compilation databases One way to simplify the documentation generation process is by using a `compile_commands.json` file generated by CMake to determine the source files to process and their compile options. diff --git a/docs/modules/ROOT/partials/workflow.adoc b/docs/modules/ROOT/partials/workflow.adoc new file mode 100644 index 0000000000..1dc02962b4 --- /dev/null +++ b/docs/modules/ROOT/partials/workflow.adoc @@ -0,0 +1,42 @@ +[mermaid] +.... +graph TD + %% Define styles for visual clarity + classDef input fill:#D1E8FF,stroke:#005CFF,stroke-width:2; + classDef artifact fill:#FFF5D1,stroke:#FFA500,stroke-width:2; + classDef output fill:#D1FFD1,stroke:#008000,stroke-width:2; + + %% Define Inputs + subgraph Inputs + CF[Configuration File] + CL[Command Line Arguments] + end + class CL,CF input + + %% Define Artifacts + subgraph Processes + P[Configuration Options] + CD[Compilation Database] + C[Corpus] + G[Generator] + end + class P artifact + class CD,C,G artifact + + %% Define Outputs + subgraph Outputs + D[Documentation] + end + class D output + + %% Relationships + CF -->|Define| P + CL -->|Define| P + P -->|Defines| CD + CD -->|Extract Symbols| C + C -->|Feeds| G + G -->|Produces| D + + %% Highlight dependencies for clarity + P -->|Influences| G +.... diff --git a/share/mrdocs/addons/generator/adoc/layouts/wrapper.adoc.hbs b/share/mrdocs/addons/generator/adoc/layouts/wrapper.adoc.hbs index e320bcc080..0522a7379b 100644 --- a/share/mrdocs/addons/generator/adoc/layouts/wrapper.adoc.hbs +++ b/share/mrdocs/addons/generator/adoc/layouts/wrapper.adoc.hbs @@ -3,6 +3,7 @@ = Reference :mrdocs: {{/unless}} + {{! Content generated with index.hbs }} {{{contents}}} diff --git a/share/mrdocs/addons/generator/adoc/layouts/index-overload-set.adoc.hbs b/share/mrdocs/addons/generator/adoc/partials/symbols/overloads.adoc.hbs similarity index 74% rename from share/mrdocs/addons/generator/adoc/layouts/index-overload-set.adoc.hbs rename to share/mrdocs/addons/generator/adoc/partials/symbols/overloads.adoc.hbs index 07f9e6b0c5..e6c9f1d64f 100644 --- a/share/mrdocs/addons/generator/adoc/layouts/index-overload-set.adoc.hbs +++ b/share/mrdocs/addons/generator/adoc/partials/symbols/overloads.adoc.hbs @@ -1,12 +1,12 @@ {{! A page when the symbol type is "overloads" }} -[#{{symbol.anchor}}] +[#{{{symbol.anchor}}}] ={{#unless @root.config.multipage}}={{/unless}} {{#if symbol.name}}{{>types/nested-name-specifier symbol=symbol.parent includeNamespace=true}}{{symbol.name}}{{else}}Unnamed overload set{{/if}} -{{#if symbol.members.[0]}} +{{#if symbol}} -{{#if symbol.members.[0].doc.brief}} +{{#if symbol.doc.brief}} -{{{symbol.members.[0].doc.brief}}} +{{{symbol.doc.brief}}} {{/if}} @@ -20,10 +20,10 @@ ---- {{/each}} -{{#if symbol.members.[0].doc.description}} +{{#if symbol.doc.description}} =={{#unless @root.config.multipage}}={{/unless}} Description -{{{symbol.members.[0].doc.description}}} +{{{symbol.doc.description}}} {{/if}} {{#with (flattenUnique symbol.members "doc.exceptions" "exception") as |allExceptions|}} @@ -41,10 +41,10 @@ {{/if}} {{/with}} -{{#if symbol.members.[0].doc.returns}} +{{#if symbol.doc.returns}} =={{#unless @root.config.multipage}}={{/unless}} Return Value -{{{symbol.members.[0].doc.returns}}} +{{{symbol.doc.returns}}} {{/if}} @@ -63,28 +63,28 @@ {{/if}} {{/with}} -{{#if symbol.members.[0].doc.preconditions}} +{{#if symbol.doc.preconditions}} =={{#unless @root.config.multipage}}={{/unless}} Preconditions -{{#each symbol.members.[0].doc.preconditions}} +{{#each symbol.doc.preconditions}} {{{.}}} {{/each}} {{/if}} -{{#if symbol.members.[0].doc.postconditions}} +{{#if symbol.doc.postconditions}} =={{#unless @root.config.multipage}}={{/unless}} Postconditions -{{#each symbol.members.[0].doc.postconditions}} +{{#each symbol.doc.postconditions}} {{{.}}} {{/each}} {{/if}} -{{#if symbol.members.[0].doc.see}} +{{#if symbol.doc.see}} =={{#unless @root.config.multipage}}={{/unless}} See Also -{{#each symbol.members.[0].doc.see}} +{{#each symbol.doc.see}} {{{.}}} {{/each}} {{/if}} diff --git a/share/mrdocs/addons/generator/common/partials/types/info-member.hbs b/share/mrdocs/addons/generator/common/partials/types/info-member.hbs index 4a5a4b2926..1738bfc076 100644 --- a/share/mrdocs/addons/generator/common/partials/types/info-member.hbs +++ b/share/mrdocs/addons/generator/common/partials/types/info-member.hbs @@ -4,7 +4,7 @@ {{#>markup/a href=(relativize url)}}{{#>markup/code}}{{>types/declarator-id . nolink=true}}{{/markup/code}}{{/markup/a}} {{>types/special-name-suffix .}} {{~/markup/td}} {{#>markup/td~}} - {{#if (ne kind "overload")~}} + {{#if (ne kind "overloads")~}} {{{~doc.brief}}} {{else~}} {{#each (unique (pluck (pluck members "doc") "brief"))~}} diff --git a/share/mrdocs/addons/generator/common/partials/types/special-name-suffix.hbs b/share/mrdocs/addons/generator/common/partials/types/special-name-suffix.hbs index dc3cc9d46c..0d0eec35a5 100644 --- a/share/mrdocs/addons/generator/common/partials/types/special-name-suffix.hbs +++ b/share/mrdocs/addons/generator/common/partials/types/special-name-suffix.hbs @@ -3,7 +3,7 @@ the symbol is a special member (e.g., constructor, destructor, overload, variant member) }} -{{#if (eq kind "overload")~}} +{{#if (eq kind "overloads")~}} {{>types/special-name-suffix (front members)}} {{~else if (eq kind "function")~}} {{#if (eq class "constructor")}} diff --git a/share/mrdocs/addons/generator/html/layouts/index-overload-set.html.hbs b/share/mrdocs/addons/generator/html/partials/symbols/overloads.html.hbs similarity index 100% rename from share/mrdocs/addons/generator/html/layouts/index-overload-set.html.hbs rename to share/mrdocs/addons/generator/html/partials/symbols/overloads.html.hbs diff --git a/src/lib/Gen/adoc/AdocGenerator.cpp b/src/lib/Gen/adoc/AdocGenerator.cpp index f0730419c1..ab312ef961 100644 --- a/src/lib/Gen/adoc/AdocGenerator.cpp +++ b/src/lib/Gen/adoc/AdocGenerator.cpp @@ -41,6 +41,13 @@ escape(OutputRef& os, std::string_view str) const if (needsEscape) { os << "pass:["; + // Using passthroughs to pass content (without substitutions) can couple + // your content to a specific output format, such as HTML. + // In these cases, you should use conditional preprocessor directives + // to route passthrough content for different output formats based on + // the current backend. + // If we would like to couple passthrough content to an HTML format, + // then we'd use `HTMLEscape(os, str)` instead of `os << str`. os << str; os << "]"; } diff --git a/src/lib/Gen/hbs/Builder.cpp b/src/lib/Gen/hbs/Builder.cpp index 19a1786678..d3d50abdf4 100644 --- a/src/lib/Gen/hbs/Builder.cpp +++ b/src/lib/Gen/hbs/Builder.cpp @@ -148,14 +148,11 @@ relativize_fn(dom::Value to0, dom::Value from0, dom::Value options) } if (!relativePath.starts_with("../") && !relativePath.starts_with("./")) { + // relative hrefs needs to explicitly include "./" so that + // they are always treated as relative to the current page relativePath = "./" + relativePath; } relativePath += hash; - - if (relativePath == "/boost.adoc") - { - relativePath = "." + relativePath; - } return relativePath; } @@ -239,27 +236,18 @@ Builder( helpers::registerContainerHelpers(hbs_); hbs_.registerHelper("relativize", dom::makeInvocable(relativize_fn)); - // load templates - exp = forEachFile(layoutDir(), false, - [&](std::string_view pathName) -> Expected - { - // Get template relative path - std::filesystem::path relPath = pathName; - relPath = relPath.lexically_relative(layoutDir()); - - // Skip non-handlebars files - MRDOCS_CHECK_OR(relPath.extension() == ".hbs", {}); - - // Load template contents - MRDOCS_TRY(std::string text, files::getFileText(pathName)); - - // Register template - this->templates_.emplace(relPath.generic_string(), text); - return {}; - }); - if (!exp) + // Load layout templates + std::string indexTemplateFilename = fmt::format("index.{}.hbs", domCorpus.fileExtension); + std::string wrapperTemplateFilename = fmt::format("wrapper.{}.hbs", domCorpus.fileExtension); + for (std::string const& filename : {indexTemplateFilename, wrapperTemplateFilename}) { - exp.error().Throw(); + std::string pathName = files::appendPath(layoutDir(), filename); + Expected text = files::getFileText(pathName); + if (!text) + { + text.error().Throw(); + } + templates_.emplace(filename, text.value()); } } @@ -334,10 +322,7 @@ Expected Builder:: operator()(std::ostream& os, T const& I) { - std::string const templateFile = - std::derived_from ? - fmt::format("index.{}.hbs", domCorpus.fileExtension) : - fmt::format("index-overload-set.{}.hbs", domCorpus.fileExtension); + std::string const templateFile = fmt::format("index.{}.hbs", domCorpus.fileExtension); dom::Object ctx = createContext(I); auto& config = domCorpus->config; diff --git a/src/lib/Metadata/Overloads.cpp b/src/lib/Metadata/Overloads.cpp index 510311cde1..7d65c67d25 100644 --- a/src/lib/Metadata/Overloads.cpp +++ b/src/lib/Metadata/Overloads.cpp @@ -34,15 +34,19 @@ tag_invoke( * The `overloads` value is a temporary reference created * by the `Info` tag_invoke. */ - v = dom::Object({ - // KRYSTIAN FIXME: need a better way to generate IDs - { "id", fmt::format("{}-{}", toBase16(overloads.Parent), overloads.Name) }, - { "kind", "overload"}, - { "name", overloads.Name }, - { "members", dom::LazyArray(overloads.Members, domCorpus) }, - { "namespace", dom::LazyArray(overloads.Namespace, domCorpus) }, - { "parent", domCorpus->get(overloads.Parent) } - }); + dom::Object res; + res.set("id", fmt::format("{}-{}", toBase16(overloads.Parent), overloads.Name)); + res.set("kind", "overloads"); + res.set("name", overloads.Name); + res.set("members", dom::LazyArray(overloads.Members, domCorpus)); + res.set("namespace", dom::LazyArray(overloads.Namespace, domCorpus)); + res.set("parent", domCorpus->get(overloads.Parent)); + dom::Value firstM = domCorpus->get(overloads.Members.front()); + if (firstM.isObject() && firstM.get("doc").isObject()) + { + res.set("doc", firstM.get("doc")); + } + v = res; } } // mrdocs diff --git a/test-files/golden-tests/alias-template.adoc b/test-files/golden-tests/alias-template.adoc index 7bb918d4d0..29a78fdf4e 100644 --- a/test-files/golden-tests/alias-template.adoc +++ b/test-files/golden-tests/alias-template.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/attributes_1.adoc b/test-files/golden-tests/attributes_1.adoc index 607c7a4828..692564c716 100644 --- a/test-files/golden-tests/attributes_1.adoc +++ b/test-files/golden-tests/attributes_1.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/brief-1.adoc b/test-files/golden-tests/brief-1.adoc index eb77130f39..3df79f9406 100644 --- a/test-files/golden-tests/brief-1.adoc +++ b/test-files/golden-tests/brief-1.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/brief-2.adoc b/test-files/golden-tests/brief-2.adoc index 8b1aa0c9c0..70c2e0ca4d 100644 --- a/test-files/golden-tests/brief-2.adoc +++ b/test-files/golden-tests/brief-2.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/canonical_1.adoc b/test-files/golden-tests/canonical_1.adoc index 641f7a2660..96e9f79a7e 100644 --- a/test-files/golden-tests/canonical_1.adoc +++ b/test-files/golden-tests/canonical_1.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/class-template-partial-spec.adoc b/test-files/golden-tests/class-template-partial-spec.adoc index ba22378807..16fcce2efc 100644 --- a/test-files/golden-tests/class-template-partial-spec.adoc +++ b/test-files/golden-tests/class-template-partial-spec.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/class-template-spec.adoc b/test-files/golden-tests/class-template-spec.adoc index 6cc158ceed..13a8308b5b 100644 --- a/test-files/golden-tests/class-template-spec.adoc +++ b/test-files/golden-tests/class-template-spec.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/class-template-specializations-1.adoc b/test-files/golden-tests/class-template-specializations-1.adoc index b7a93a66c9..0e3b596387 100644 --- a/test-files/golden-tests/class-template-specializations-1.adoc +++ b/test-files/golden-tests/class-template-specializations-1.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/class-template-specializations-2.adoc b/test-files/golden-tests/class-template-specializations-2.adoc index c8297ba3b8..a3165b564e 100644 --- a/test-files/golden-tests/class-template-specializations-2.adoc +++ b/test-files/golden-tests/class-template-specializations-2.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/class-template-specializations-3.adoc b/test-files/golden-tests/class-template-specializations-3.adoc index 92bd83c9f4..d024b47736 100644 --- a/test-files/golden-tests/class-template-specializations-3.adoc +++ b/test-files/golden-tests/class-template-specializations-3.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/class-template.adoc b/test-files/golden-tests/class-template.adoc index da21f48964..0fa0476b34 100644 --- a/test-files/golden-tests/class-template.adoc +++ b/test-files/golden-tests/class-template.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/commands.adoc b/test-files/golden-tests/commands.adoc index d9948660b6..cdfe61f8ff 100644 --- a/test-files/golden-tests/commands.adoc +++ b/test-files/golden-tests/commands.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/concept.adoc b/test-files/golden-tests/concept.adoc index 361f85081b..167e7fce3a 100644 --- a/test-files/golden-tests/concept.adoc +++ b/test-files/golden-tests/concept.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/dependency-propagation.adoc b/test-files/golden-tests/dependency-propagation.adoc index a7ea99479f..014292b17f 100644 --- a/test-files/golden-tests/dependency-propagation.adoc +++ b/test-files/golden-tests/dependency-propagation.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/duplicate-jdoc.adoc b/test-files/golden-tests/duplicate-jdoc.adoc index 4c5fa3a962..4055e8ecfc 100644 --- a/test-files/golden-tests/duplicate-jdoc.adoc +++ b/test-files/golden-tests/duplicate-jdoc.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/empty.adoc b/test-files/golden-tests/empty.adoc index cf41aa73c2..fb780877b6 100644 --- a/test-files/golden-tests/empty.adoc +++ b/test-files/golden-tests/empty.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/enum.adoc b/test-files/golden-tests/enum.adoc index 4179c6c9c3..557aada284 100644 --- a/test-files/golden-tests/enum.adoc +++ b/test-files/golden-tests/enum.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/explicit-conv-operator.adoc b/test-files/golden-tests/explicit-conv-operator.adoc index 982909094a..bf6a911022 100644 --- a/test-files/golden-tests/explicit-conv-operator.adoc +++ b/test-files/golden-tests/explicit-conv-operator.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/explicit-ctor.adoc b/test-files/golden-tests/explicit-ctor.adoc index 8a9a3ade56..045a54135b 100644 --- a/test-files/golden-tests/explicit-ctor.adoc +++ b/test-files/golden-tests/explicit-ctor.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace @@ -47,7 +48,7 @@ struct Explicit; -[#pass:[Explicit-2constructor]] +[#Explicit-2constructor] == <<#Explicit,Explicit>>::Explicit @@ -203,7 +204,7 @@ struct ExplicitTrue; -[#pass:[ExplicitTrue-2constructor]] +[#ExplicitTrue-2constructor] == <<#ExplicitTrue,ExplicitTrue>>::ExplicitTrue @@ -359,7 +360,7 @@ struct ExplicitFalse; -[#pass:[ExplicitFalse-2constructor]] +[#ExplicitFalse-2constructor] == <<#ExplicitFalse,ExplicitFalse>>::ExplicitFalse @@ -516,7 +517,7 @@ struct ExplicitExpression; -[#pass:[ExplicitExpression-2constructor]] +[#ExplicitExpression-2constructor] == <<#ExplicitExpression,ExplicitExpression>>::ExplicitExpression diff --git a/test-files/golden-tests/explicit-deduct-guide.adoc b/test-files/golden-tests/explicit-deduct-guide.adoc index a91f4605a7..8f8907d87c 100644 --- a/test-files/golden-tests/explicit-deduct-guide.adoc +++ b/test-files/golden-tests/explicit-deduct-guide.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/explicit-object-parameter.adoc b/test-files/golden-tests/explicit-object-parameter.adoc index 354927f16b..a9bd649231 100644 --- a/test-files/golden-tests/explicit-object-parameter.adoc +++ b/test-files/golden-tests/explicit-object-parameter.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace @@ -38,7 +39,7 @@ struct Optional; -[#pass:[Optional-value]] +[#Optional-value] == <<#Optional,Optional>>::value diff --git a/test-files/golden-tests/filters/blacklist_0.adoc b/test-files/golden-tests/filters/blacklist_0.adoc index c072ae76a6..f559c45108 100644 --- a/test-files/golden-tests/filters/blacklist_0.adoc +++ b/test-files/golden-tests/filters/blacklist_0.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/filters/blacklist_test.adoc b/test-files/golden-tests/filters/blacklist_test.adoc index 46954ab507..742cc321cf 100644 --- a/test-files/golden-tests/filters/blacklist_test.adoc +++ b/test-files/golden-tests/filters/blacklist_test.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/filters/filters.adoc b/test-files/golden-tests/filters/filters.adoc index eb81b59df1..9a9456a334 100644 --- a/test-files/golden-tests/filters/filters.adoc +++ b/test-files/golden-tests/filters/filters.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/filters/whitelist_0.adoc b/test-files/golden-tests/filters/whitelist_0.adoc index 2b444c9b8c..38269f6fd6 100644 --- a/test-files/golden-tests/filters/whitelist_0.adoc +++ b/test-files/golden-tests/filters/whitelist_0.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/filters/whitelist_test.adoc b/test-files/golden-tests/filters/whitelist_test.adoc index 314e05f2f3..2dc41b0417 100644 --- a/test-files/golden-tests/filters/whitelist_test.adoc +++ b/test-files/golden-tests/filters/whitelist_test.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/friend-1.adoc b/test-files/golden-tests/friend-1.adoc index 9bcdbb5490..7e50e092ff 100644 --- a/test-files/golden-tests/friend-1.adoc +++ b/test-files/golden-tests/friend-1.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/friend-2.adoc b/test-files/golden-tests/friend-2.adoc index d59af1f555..eef9ab8d31 100644 --- a/test-files/golden-tests/friend-2.adoc +++ b/test-files/golden-tests/friend-2.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/friend-3.adoc b/test-files/golden-tests/friend-3.adoc index 3250fab557..1e4d413d26 100644 --- a/test-files/golden-tests/friend-3.adoc +++ b/test-files/golden-tests/friend-3.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/friend-4.adoc b/test-files/golden-tests/friend-4.adoc index 405df650bf..1a6c6353ad 100644 --- a/test-files/golden-tests/friend-4.adoc +++ b/test-files/golden-tests/friend-4.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/friend-5.adoc b/test-files/golden-tests/friend-5.adoc index 65d848b85c..9ce053784d 100644 --- a/test-files/golden-tests/friend-5.adoc +++ b/test-files/golden-tests/friend-5.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/friend-6.adoc b/test-files/golden-tests/friend-6.adoc index 0b823e6eb1..73f78fce03 100644 --- a/test-files/golden-tests/friend-6.adoc +++ b/test-files/golden-tests/friend-6.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/function-parm-decay.adoc b/test-files/golden-tests/function-parm-decay.adoc index 20c26c5084..f178a6e013 100644 --- a/test-files/golden-tests/function-parm-decay.adoc +++ b/test-files/golden-tests/function-parm-decay.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/function-template.adoc b/test-files/golden-tests/function-template.adoc index f4f30453e0..09c97cebbe 100644 --- a/test-files/golden-tests/function-template.adoc +++ b/test-files/golden-tests/function-template.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/function-tparm-decay.adoc b/test-files/golden-tests/function-tparm-decay.adoc index 2d2afbf565..b8ee17b370 100644 --- a/test-files/golden-tests/function-tparm-decay.adoc +++ b/test-files/golden-tests/function-tparm-decay.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/implicit-instantiation-member-ref.adoc b/test-files/golden-tests/implicit-instantiation-member-ref.adoc index ec279dea98..f8ac71f4c8 100644 --- a/test-files/golden-tests/implicit-instantiation-member-ref.adoc +++ b/test-files/golden-tests/implicit-instantiation-member-ref.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/local-class.adoc b/test-files/golden-tests/local-class.adoc index 15fabda6bb..8e075aea11 100644 --- a/test-files/golden-tests/local-class.adoc +++ b/test-files/golden-tests/local-class.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/mem-fn.adoc b/test-files/golden-tests/mem-fn.adoc index a446a3b179..a4bf931434 100644 --- a/test-files/golden-tests/mem-fn.adoc +++ b/test-files/golden-tests/mem-fn.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/namespace-alias-1.adoc b/test-files/golden-tests/namespace-alias-1.adoc index 8e9c9b5adf..6725827729 100644 --- a/test-files/golden-tests/namespace-alias-1.adoc +++ b/test-files/golden-tests/namespace-alias-1.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/namespace-alias-2.adoc b/test-files/golden-tests/namespace-alias-2.adoc index 6ee6c305c6..01afcf3749 100644 --- a/test-files/golden-tests/namespace-alias-2.adoc +++ b/test-files/golden-tests/namespace-alias-2.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/namespace-alias-3.adoc b/test-files/golden-tests/namespace-alias-3.adoc index 47abad883d..b2d2ebf578 100644 --- a/test-files/golden-tests/namespace-alias-3.adoc +++ b/test-files/golden-tests/namespace-alias-3.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/namespace.adoc b/test-files/golden-tests/namespace.adoc index f3559245b9..8c19429e4b 100644 --- a/test-files/golden-tests/namespace.adoc +++ b/test-files/golden-tests/namespace.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/nested-private-template.adoc b/test-files/golden-tests/nested-private-template.adoc index b8e6630de0..08a8f61a70 100644 --- a/test-files/golden-tests/nested-private-template.adoc +++ b/test-files/golden-tests/nested-private-template.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/no_unique_address.adoc b/test-files/golden-tests/no_unique_address.adoc index 5a7308da6c..dfa2bb787e 100644 --- a/test-files/golden-tests/no_unique_address.adoc +++ b/test-files/golden-tests/no_unique_address.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/noreturn.adoc b/test-files/golden-tests/noreturn.adoc index 78ff81dea7..debe0d2b1c 100644 --- a/test-files/golden-tests/noreturn.adoc +++ b/test-files/golden-tests/noreturn.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/ns-variables.adoc b/test-files/golden-tests/ns-variables.adoc index 4e334e78cf..9f2207751b 100644 --- a/test-files/golden-tests/ns-variables.adoc +++ b/test-files/golden-tests/ns-variables.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/out-of-line-record-def.adoc b/test-files/golden-tests/out-of-line-record-def.adoc index 7cf69df880..b83c6f4ca4 100644 --- a/test-files/golden-tests/out-of-line-record-def.adoc +++ b/test-files/golden-tests/out-of-line-record-def.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/overloaded-op-1.adoc b/test-files/golden-tests/overloaded-op-1.adoc index 09b2ba0546..d75997646e 100644 --- a/test-files/golden-tests/overloaded-op-1.adoc +++ b/test-files/golden-tests/overloaded-op-1.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/overloaded-op-2.adoc b/test-files/golden-tests/overloaded-op-2.adoc index 4fede2900a..0363413733 100644 --- a/test-files/golden-tests/overloaded-op-2.adoc +++ b/test-files/golden-tests/overloaded-op-2.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/para-1.adoc b/test-files/golden-tests/para-1.adoc index 0b36eaaabf..f9fb343955 100644 --- a/test-files/golden-tests/para-1.adoc +++ b/test-files/golden-tests/para-1.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/para-2.adoc b/test-files/golden-tests/para-2.adoc index 43174c3d99..adcd529614 100644 --- a/test-files/golden-tests/para-2.adoc +++ b/test-files/golden-tests/para-2.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/param-direction.adoc b/test-files/golden-tests/param-direction.adoc index b038d9d3af..2f2ef4962f 100644 --- a/test-files/golden-tests/param-direction.adoc +++ b/test-files/golden-tests/param-direction.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/param.adoc b/test-files/golden-tests/param.adoc index 32f72ef188..c017043ce7 100644 --- a/test-files/golden-tests/param.adoc +++ b/test-files/golden-tests/param.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/pre-post.adoc b/test-files/golden-tests/pre-post.adoc index c24901b010..48867808bc 100644 --- a/test-files/golden-tests/pre-post.adoc +++ b/test-files/golden-tests/pre-post.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/record-1.adoc b/test-files/golden-tests/record-1.adoc index 13012b8810..f56f075fc2 100644 --- a/test-files/golden-tests/record-1.adoc +++ b/test-files/golden-tests/record-1.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/record-access.adoc b/test-files/golden-tests/record-access.adoc index 61afdb466b..c313407af5 100644 --- a/test-files/golden-tests/record-access.adoc +++ b/test-files/golden-tests/record-access.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/record-data.adoc b/test-files/golden-tests/record-data.adoc index 1dfac57d30..13cda6b806 100644 --- a/test-files/golden-tests/record-data.adoc +++ b/test-files/golden-tests/record-data.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/record-inheritance.adoc b/test-files/golden-tests/record-inheritance.adoc index c35fb1c422..7679d9cb2c 100644 --- a/test-files/golden-tests/record-inheritance.adoc +++ b/test-files/golden-tests/record-inheritance.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/ref.adoc b/test-files/golden-tests/ref.adoc index 4a4f525af7..b7f42c0813 100644 --- a/test-files/golden-tests/ref.adoc +++ b/test-files/golden-tests/ref.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/requires-clause.adoc b/test-files/golden-tests/requires-clause.adoc index 92af0e8143..6122be2ad1 100644 --- a/test-files/golden-tests/requires-clause.adoc +++ b/test-files/golden-tests/requires-clause.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/spec-mem-implicit-instantiation.adoc b/test-files/golden-tests/spec-mem-implicit-instantiation.adoc index 4698fd57c0..4e1427f24e 100644 --- a/test-files/golden-tests/spec-mem-implicit-instantiation.adoc +++ b/test-files/golden-tests/spec-mem-implicit-instantiation.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/static-data-def-constexpr.adoc b/test-files/golden-tests/static-data-def-constexpr.adoc index a62421314a..294eb9454d 100644 --- a/test-files/golden-tests/static-data-def-constexpr.adoc +++ b/test-files/golden-tests/static-data-def-constexpr.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/static-data-def.adoc b/test-files/golden-tests/static-data-def.adoc index 214172e185..737b712d6b 100644 --- a/test-files/golden-tests/static-data-def.adoc +++ b/test-files/golden-tests/static-data-def.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/static-data-template.adoc b/test-files/golden-tests/static-data-template.adoc index 64be1eb98c..e8fee95037 100644 --- a/test-files/golden-tests/static-data-template.adoc +++ b/test-files/golden-tests/static-data-template.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/temp/c_mct_expl_inline.adoc b/test-files/golden-tests/temp/c_mct_expl_inline.adoc index ca31c18f48..2ddf13e056 100644 --- a/test-files/golden-tests/temp/c_mct_expl_inline.adoc +++ b/test-files/golden-tests/temp/c_mct_expl_inline.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/temp/c_mct_expl_outside.adoc b/test-files/golden-tests/temp/c_mct_expl_outside.adoc index a675561254..7a8230ff67 100644 --- a/test-files/golden-tests/temp/c_mct_expl_outside.adoc +++ b/test-files/golden-tests/temp/c_mct_expl_outside.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/temp/c_mft_expl_inline.adoc b/test-files/golden-tests/temp/c_mft_expl_inline.adoc index 5ceae94bd8..373c31c839 100644 --- a/test-files/golden-tests/temp/c_mft_expl_inline.adoc +++ b/test-files/golden-tests/temp/c_mft_expl_inline.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace @@ -38,7 +39,7 @@ struct A; -[#pass:[A-f]] +[#A-f] == <<#A,A>>::f diff --git a/test-files/golden-tests/temp/c_mft_expl_outside.adoc b/test-files/golden-tests/temp/c_mft_expl_outside.adoc index 8abc49196e..210d8d0e10 100644 --- a/test-files/golden-tests/temp/c_mft_expl_outside.adoc +++ b/test-files/golden-tests/temp/c_mft_expl_outside.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace @@ -38,7 +39,7 @@ struct A; -[#pass:[A-f]] +[#A-f] == <<#A,A>>::f diff --git a/test-files/golden-tests/temp/ct_expl.adoc b/test-files/golden-tests/temp/ct_expl.adoc index bd14641d1b..6cb6b370ea 100644 --- a/test-files/golden-tests/temp/ct_expl.adoc +++ b/test-files/golden-tests/temp/ct_expl.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/temp/ct_mc.adoc b/test-files/golden-tests/temp/ct_mc.adoc index 4afd07e2ec..8bed3a9a9e 100644 --- a/test-files/golden-tests/temp/ct_mc.adoc +++ b/test-files/golden-tests/temp/ct_mc.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/temp/ct_mc_expl_outside.adoc b/test-files/golden-tests/temp/ct_mc_expl_outside.adoc index abf33a7790..fa6896758b 100644 --- a/test-files/golden-tests/temp/ct_mc_expl_outside.adoc +++ b/test-files/golden-tests/temp/ct_mc_expl_outside.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/temp/ct_mct.adoc b/test-files/golden-tests/temp/ct_mct.adoc index 46f46545ca..0148bf0f55 100644 --- a/test-files/golden-tests/temp/ct_mct.adoc +++ b/test-files/golden-tests/temp/ct_mct.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/temp/ct_mct_expl_inline.adoc b/test-files/golden-tests/temp/ct_mct_expl_inline.adoc index 84540385c6..427d32b77d 100644 --- a/test-files/golden-tests/temp/ct_mct_expl_inline.adoc +++ b/test-files/golden-tests/temp/ct_mct_expl_inline.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/temp/ct_mct_expl_outside.adoc b/test-files/golden-tests/temp/ct_mct_expl_outside.adoc index 93f879b6d5..ab693976c0 100644 --- a/test-files/golden-tests/temp/ct_mct_expl_outside.adoc +++ b/test-files/golden-tests/temp/ct_mct_expl_outside.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/temp/ct_mf.adoc b/test-files/golden-tests/temp/ct_mf.adoc index fcc3549420..6fcec08f6a 100644 --- a/test-files/golden-tests/temp/ct_mf.adoc +++ b/test-files/golden-tests/temp/ct_mf.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/temp/ct_mf_expl_outside.adoc b/test-files/golden-tests/temp/ct_mf_expl_outside.adoc index 786997eaae..17f81e330e 100644 --- a/test-files/golden-tests/temp/ct_mf_expl_outside.adoc +++ b/test-files/golden-tests/temp/ct_mf_expl_outside.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/temp/ct_mft.adoc b/test-files/golden-tests/temp/ct_mft.adoc index 18ab599dc0..cf244b774b 100644 --- a/test-files/golden-tests/temp/ct_mft.adoc +++ b/test-files/golden-tests/temp/ct_mft.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/temp/ct_mft_expl_inline.adoc b/test-files/golden-tests/temp/ct_mft_expl_inline.adoc index 597b0e896c..a1ef984bbe 100644 --- a/test-files/golden-tests/temp/ct_mft_expl_inline.adoc +++ b/test-files/golden-tests/temp/ct_mft_expl_inline.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace @@ -39,7 +40,7 @@ struct A; -[#pass:[A-f]] +[#A-f] == <<#A,A>>::f diff --git a/test-files/golden-tests/temp/ct_mft_expl_outside.adoc b/test-files/golden-tests/temp/ct_mft_expl_outside.adoc index d64132ece2..b08260e49d 100644 --- a/test-files/golden-tests/temp/ct_mft_expl_outside.adoc +++ b/test-files/golden-tests/temp/ct_mft_expl_outside.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/temp/ft_expl.adoc b/test-files/golden-tests/temp/ft_expl.adoc index c59c73be66..5f81272980 100644 --- a/test-files/golden-tests/temp/ft_expl.adoc +++ b/test-files/golden-tests/temp/ft_expl.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/type-resolution.adoc b/test-files/golden-tests/type-resolution.adoc index e56c859150..98e72e9180 100644 --- a/test-files/golden-tests/type-resolution.adoc +++ b/test-files/golden-tests/type-resolution.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/union.adoc b/test-files/golden-tests/union.adoc index 08637affef..61c80f04f3 100644 --- a/test-files/golden-tests/union.adoc +++ b/test-files/golden-tests/union.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/using-1.adoc b/test-files/golden-tests/using-1.adoc index 2888db6afa..85799c3af2 100644 --- a/test-files/golden-tests/using-1.adoc +++ b/test-files/golden-tests/using-1.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/using-2.adoc b/test-files/golden-tests/using-2.adoc index 492607f8e9..17e98c2981 100644 --- a/test-files/golden-tests/using-2.adoc +++ b/test-files/golden-tests/using-2.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/using-3.adoc b/test-files/golden-tests/using-3.adoc index 1a6a9e8788..f048e2f8ff 100644 --- a/test-files/golden-tests/using-3.adoc +++ b/test-files/golden-tests/using-3.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/utf-8.adoc b/test-files/golden-tests/utf-8.adoc index 26dab8e74c..666e4fd540 100644 --- a/test-files/golden-tests/utf-8.adoc +++ b/test-files/golden-tests/utf-8.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/var-template.adoc b/test-files/golden-tests/var-template.adoc index 9f579c72ba..656c586142 100644 --- a/test-files/golden-tests/var-template.adoc +++ b/test-files/golden-tests/var-template.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace diff --git a/test-files/golden-tests/variadic-function.adoc b/test-files/golden-tests/variadic-function.adoc index c8649c5c86..21bc256c82 100644 --- a/test-files/golden-tests/variadic-function.adoc +++ b/test-files/golden-tests/variadic-function.adoc @@ -1,5 +1,6 @@ = Reference :mrdocs: + [#index] == Global namespace