> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.doc-detective.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.doc-detective.com/_mcp/server.

# Formats, written as tests

> What differs from one documentation format to the next, with one procedure per format that uses each of its statement forms, its ignore blocks, and its way to keep a code block from running.

Doc Detective reads the same tests and detects the same kinds of steps in every format. What changes is the syntax: where a statement goes, how you mark a code block, and which markup detection reads. Each example below uses one format and several of its syntax variants. Its inline variants still resolve to the same steps as its standalone spec. For what each tab holds, see [Navigation and interaction](/reference/docs-as-tests/navigation-interaction).

## Statements at a glance

A statement is the keyword `test`, `step`, `test end`, `test ignore start`, or `test ignore end`, inside a comment. The `test` and `step` keywords take a JSON object, a YAML mapping, or XML-style attributes such as `find="Save"`. A YAML statement on one line holds one key, or a flow mapping such as `{testId: my-test, detectSteps: false}`.

| Format           | Extensions                | Statement syntax                                                                             |
| ---------------- | ------------------------- | -------------------------------------------------------------------------------------------- |
| Markdown         | `md`, `markdown`, `mdx`   | `<!-- … -->`, `{/* … */}`, and `[comment]: # (…)`, `[comment]: # '…'`, or `[comment]: # "…"` |
| AsciiDoc         | `adoc`, `asciidoc`, `asc` | `// (…)` on one line, or `(…)` inside a `////` comment block                                 |
| HTML             | `html`, `htm`             | `<!-- … -->`                                                                                 |
| reStructuredText | `rst`                     | `.. …` comment, with a blank line before and after. An indented block below continues it.    |
| DITA             | `dita`, `ditamap`, `xml`  | `<?doc-detective … ?>`, `<!-- … -->`, and `<data name="doc-detective" value="…"/>`           |

A comment can span lines in every format. Doc Detective doesn't read a statement inside a code block or inline code, so a page can show a statement without running it.

## Default detection by format

With detection on, each format turns the same kinds of markup into steps. For the full list, see [What gets detected](/docs/test-docs/input-formats/overview#what-gets-detected).

| Step                           | Markdown                    | AsciiDoc                                  | HTML                    | reStructuredText          | DITA                          |
| ------------------------------ | --------------------------- | ----------------------------------------- | ----------------------- | ------------------------- | ----------------------------- |
| `goTo` and `checkLink`         | `[text](https://…)`         | `https://…[text]`, `link:https://…[text]` | `<a href="https://…">`  | `` `text <https://…>`_ `` | `<xref href="https://…">`     |
| `click` and `find`             | `**text**`                  | `*text*`, `**text**`                      | `<strong>`, `<b>`       | `**text**`                | `<b>`, `<uicontrol>`          |
| `screenshot`                   | `![alt](path){.screenshot}` | `role=screenshot`                         | `class="screenshot"`    | `:class: screenshot`      | `outputclass="screenshot"`    |
| `httpRequest`                  | ` ```http `                 | `[source,http]`                           | `class="language-http"` | `.. code-block:: http`    | `outputclass="language-http"` |
| `runCode`                      | ` ```bash `                 | `[source,bash]`                           | `class="language-bash"` | `.. code-block:: bash`    | `outputclass="language-bash"` |
| Keep a code block from running | ` ```bash testIgnore `      | `[source,bash,testIgnore]`                | An ignore block         | `:class: testIgnore`      | An ignore block               |

In every format, a link right after a navigation verb, such as "Go to," also becomes a `goTo` step. Bold text right after a click verb, such as "Click," also becomes a `click` step. Quoted text after "Type," "Enter," or "Press" becomes a `type` step.

DITA also reads its semantic elements. A `<uicontrol>` becomes a `find` step, and after a click verb, a `click` step too. A `<uicontrol>` after a `Type <userinput>…</userinput> into the` phrase becomes a `type` step into that control. A `<wintitle>` becomes a `find` step, and a `<link>` to a web URL becomes a `checkLink` step.

HTML and DITA code blocks carry no `testIgnore` marker, so wrap a code block you don't want to run in an ignore block.

## Echo text in `.md` and `.mdx` files

This procedure uses [`goTo`](/docs/actions/goto), [`click`](/docs/actions/click), [`type`](/docs/actions/type), and [`find`](/docs/actions/find). The Markdown file uses each `[comment]: #` form, an HTML comment with a YAML body, and an HTML comment that spans lines. The MDX file uses `{/* */}` comments the same way.

#### Prose

#### Markdown

**`prose.md`**

````markdown title="prose.md"
# Echo text back

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
2. Click **Type here:**.
3. Type "Hello, Markdown".
4. Check that the page shows **Hello, Markdown** below the field.

To fetch the page from a terminal instead, run:

```bash testIgnore
curl http://localhost:8092/type-echo.html
```

To start over, go to [the elements demo](http://localhost:8092/index.html).
````

#### MDX

**`prose.mdx`**

````mdx title="prose.mdx"
# Echo text back

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
2. Click **Type here:**.
3. Type "Hello, Markdown".
4. Check that the page shows **Hello, Markdown** below the field.

To fetch the page from a terminal instead, run:

```bash testIgnore
curl http://localhost:8092/type-echo.html
```

To start over, go to [the elements demo](http://localhost:8092/index.html).
````

#### Detected

#### Markdown

**`detected.md`**

````markdown title="detected.md"
[comment]: # (test {"testId":"formats-markdown","detectSteps":true})

# Echo text back

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
2. Click **Type here:**.
3. Type "Hello, Markdown".
4. Check that the page shows **Hello, Markdown** below the field.

To fetch the page from a terminal instead, run:

```bash testIgnore
curl http://localhost:8092/type-echo.html
```

<!-- test ignore start -->

To start over, go to [the elements demo](http://localhost:8092/index.html).

<!-- test ignore end -->

[comment]: # "test end"
````

#### MDX

**`detected.mdx`**

````mdx title="detected.mdx"
{/* test {"testId":"formats-markdown","detectSteps":true} */}

# Echo text back

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
2. Click **Type here:**.
3. Type "Hello, Markdown".
4. Check that the page shows **Hello, Markdown** below the field.

To fetch the page from a terminal instead, run:

```bash testIgnore
curl http://localhost:8092/type-echo.html
```

{/* test ignore start */}

To start over, go to [the elements demo](http://localhost:8092/index.html).

{/* test ignore end */}

[comment]: # (test end)
````

#### Inline

#### Markdown

**`inline.md`**

````markdown title="inline.md"
[comment]: # (test {"testId":"formats-markdown","detectSteps":false})

# Echo text back

1. Go to [the type echo page](http://localhost:8092/type-echo.html).

   <!-- step goTo: http://localhost:8092/type-echo.html -->

2. Click **Type here:**.

   [comment]: # 'step {"click":"Type here:"}'

3. Type "Hello, Markdown".

   [comment]: # "step type: Hello, Markdown"

4. Check that the page shows **Hello, Markdown** below the field.

   <!--
   step {"find": "Hello, Markdown"}
   -->

To fetch the page from a terminal instead, run:

```bash testIgnore
curl http://localhost:8092/type-echo.html
```

<!-- test ignore start -->

To start over, go to [the elements demo](http://localhost:8092/index.html).

<!-- step {"goTo":"http://localhost:8092/index.html"} -->

<!-- test ignore end -->

[comment]: # "test end"
````

#### MDX

**`inline.mdx`**

````mdx title="inline.mdx"
{/* test {"testId":"formats-markdown","detectSteps":false} */}

# Echo text back

1. Go to [the type echo page](http://localhost:8092/type-echo.html).

   {/* step goTo: http://localhost:8092/type-echo.html */}

2. Click **Type here:**.

   [comment]: # 'step {"click":"Type here:"}'

3. Type "Hello, Markdown".

   [comment]: # "step type: Hello, Markdown"

4. Check that the page shows **Hello, Markdown** below the field.

   {/*
   step {"find": "Hello, Markdown"}
   */}

To fetch the page from a terminal instead, run:

```bash testIgnore
curl http://localhost:8092/type-echo.html
```

{/* test ignore start */}

To start over, go to [the elements demo](http://localhost:8092/index.html).

{/* step {"goTo":"http://localhost:8092/index.html"} */}

{/* test ignore end */}

[comment]: # (test end)
````

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-markdown",
      "steps": [
        {
          "goTo": "http://localhost:8092/type-echo.html"
        },
        {
          "click": "Type here:"
        },
        {
          "type": "Hello, Markdown"
        },
        {
          "find": "Hello, Markdown"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-markdown
    steps:
      - goTo: http://localhost:8092/type-echo.html
      - click: "Type here:"
      - type: Hello, Markdown
      - find: Hello, Markdown
```

* A `[comment]: #` statement is a Markdown link reference definition, so it needs a blank line before it. Inside a list item, indent it to the item's text.
* Its body can sit in parentheses, single quotes, or double quotes. Inside double quotes, use YAML, as in `[comment]: # "step type: Hello, Markdown"`, because a JSON object holds double quotes.
* MDX builds fail on HTML comments, so an `.mdx` page uses `{/* */}` or `[comment]: #` statements.
* ` ```bash testIgnore ` keeps the `curl` block from becoming a `runCode` step. The ignore block keeps the link to the elements demo from becoming `goTo` and `checkLink` steps.

### What detection finds

The link becomes a `goTo` step and a `checkLink` step. **Type here:** becomes a `click` step and a `find` step. The quoted text becomes a `type` step, and **Hello, Markdown** becomes a `find` step.

## Create a user in AsciiDoc

This procedure uses [`httpRequest`](/docs/actions/httprequest). The test statement is a YAML flow mapping. One step spans several lines in a `////` comment block, and the rest are `// (…)` line comments.

#### Prose

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Create a user

To create a user, send this request:

[source,http]
----
POST http://localhost:8092/api/users
Content-Type: application/json

{"name": "Grace"}
----

To send the same request from a terminal, run:

[source,bash,testIgnore]
----
curl -X POST -H "Content-Type: application/json" -d '{"name": "Grace"}' http://localhost:8092/api/users
----

To rename the user later, send this request:

[source,http]
----
PUT http://localhost:8092/api/users/grace
Content-Type: application/json

{"name": "Grace Hopper"}
----
```

#### Detected

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Create a user

// (test {"testId":"formats-asciidoc","detectSteps":true})

To create a user, send this request:

[source,http]
----
POST http://localhost:8092/api/users
Content-Type: application/json

{"name": "Grace"}
----

To send the same request from a terminal, run:

[source,bash,testIgnore]
----
curl -X POST -H "Content-Type: application/json" -d '{"name": "Grace"}' http://localhost:8092/api/users
----

// (test ignore start)

To rename the user later, send this request:

[source,http]
----
PUT http://localhost:8092/api/users/grace
Content-Type: application/json

{"name": "Grace Hopper"}
----

// (test ignore end)

// (test end)
```

#### Inline

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Create a user

// (test {testId: formats-asciidoc, detectSteps: false})

To create a user, send this request:

[source,http]
----
POST http://localhost:8092/api/users
Content-Type: application/json

{"name": "Grace"}
----

////
(step {
  "httpRequest": {
    "url": "http://localhost:8092/api/users",
    "method": "post",
    "request": {"body": {"name": "Grace"}},
    "response": {"body": {"name": "Grace"}}
  }
})
////

To send the same request from a terminal, run:

[source,bash,testIgnore]
----
curl -X POST -H "Content-Type: application/json" -d '{"name": "Grace"}' http://localhost:8092/api/users
----

// (test ignore start)

To rename the user later, send this request:

[source,http]
----
PUT http://localhost:8092/api/users/grace
Content-Type: application/json

{"name": "Grace Hopper"}
----

// (step {"httpRequest":{"url":"http://localhost:8092/api/users/grace","method":"put","request":{"body":{"name":"Grace Hopper"}}}})

// (test ignore end)

// (test end)
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-asciidoc",
      "steps": [
        {
          "httpRequest": {
            "url": "http://localhost:8092/api/users",
            "method": "post",
            "request": {
              "body": {
                "name": "Grace"
              }
            },
            "response": {
              "body": {
                "name": "Grace"
              }
            }
          }
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-asciidoc
    steps:
      - httpRequest:
          url: http://localhost:8092/api/users
          method: post
          request:
            body:
              name: Grace
          response:
            body:
              name: Grace
```

* A `//` comment counts only at the start of a line, and its statement sits in parentheses.
* In a `////` block, the whole block is the statement, so a long step can span lines.
* `[source,bash,testIgnore]` keeps the `curl` listing from becoming a `runCode` step. The ignore block skips the rename request.

### What detection finds

The `[source,http]` listing becomes an `httpRequest` step with the listing's method, URL, header, and body. Detection doesn't add the `response` check, so the inline and standalone variants hold it.

## Press a button in HTML

This procedure uses [`goTo`](/docs/actions/goto), [`find`](/docs/actions/find), and [`click`](/docs/actions/click). The statements use a JSON body, a YAML body, XML-style attributes, and a comment that spans lines.

#### Prose

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Press a button</title></head>
<body>
<h1>Press a button</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/index.html">the elements demo</a>.</li>
  <li>Find the <strong>Buttons</strong> section.</li>
  <li>Click <strong>Standard Button</strong>.</li>
</ol>
<p>To fetch the page from a terminal instead, run:</p>
<pre><code class="language-bash">curl http://localhost:8092/index.html</code></pre>
</body>
</html>
```

#### Detected

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Press a button</title></head>
<body>
<!-- test {"testId":"formats-html","detectSteps":true} -->
<h1>Press a button</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/index.html">the elements demo</a>.</li>
  <li>Find the <strong>Buttons</strong> section.</li>
  <li>Click <strong>Standard Button</strong>.</li>
</ol>
<!-- test ignore start -->
<p>To fetch the page from a terminal instead, run:</p>
<pre><code class="language-bash">curl http://localhost:8092/index.html</code></pre>
<!-- test ignore end -->
<!-- test end -->
</body>
</html>
```

#### Inline

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Press a button</title></head>
<body>
<!-- test {"testId":"formats-html","detectSteps":false} -->
<h1>Press a button</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/index.html">the elements demo</a>.
    <!-- step goTo: http://localhost:8092/index.html --></li>
  <li>Find the <strong>Buttons</strong> section.
    <!-- step find="Buttons" --></li>
  <li>Click <strong>Standard Button</strong>.
    <!--
      step {"click": "Standard Button"}
    --></li>
</ol>
<!-- test ignore start -->
<p>To fetch the page from a terminal instead, run:</p>
<pre><code class="language-bash">curl http://localhost:8092/index.html</code></pre>
<!-- step {"runShell":"curl http://localhost:8092/index.html"} -->
<!-- test ignore end -->
<!-- test end -->
</body>
</html>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-html",
      "steps": [
        {
          "goTo": "http://localhost:8092/index.html"
        },
        {
          "find": "Buttons"
        },
        {
          "click": "Standard Button"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-html
    steps:
      - goTo: http://localhost:8092/index.html
      - find: Buttons
      - click: Standard Button
```

* HTML reads statements only from `<!-- -->` comments.
* A `<code class="language-bash">` block has no `testIgnore` marker, so the ignore block keeps the `curl` block from becoming a `runCode` step.

### What detection finds

The link becomes a `goTo` step and a `checkLink` step, and **Buttons** becomes a `find` step. After "Click," **Standard Button** becomes a `click` step and a `find` step.

## Look up a user in reStructuredText

This procedure uses [`checkLink`](/docs/actions/checklink) and [`httpRequest`](/docs/actions/httprequest). The statements use a JSON body, a YAML body, and a step that continues on the indented lines below `.. step`.

#### Prose

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Look up a user
==============

#. Check that `the API <http://localhost:8092/status/200>`_ answers.
#. Send this request:

   .. code-block:: http

      GET http://localhost:8092/api/users?name=Linus

#. To send the same request from a terminal, run:

   .. code-block:: bash
      :class: testIgnore

      curl "http://localhost:8092/api/users?name=Linus"

To browse the demo pages, go to `the elements demo <http://localhost:8092/index.html>`_.
```

#### Detected

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Look up a user
==============

.. test {"testId":"formats-rst","detectSteps":true}

#. Check that `the API <http://localhost:8092/status/200>`_ answers.
#. Send this request:

   .. code-block:: http

      GET http://localhost:8092/api/users?name=Linus

#. To send the same request from a terminal, run:

   .. code-block:: bash
      :class: testIgnore

      curl "http://localhost:8092/api/users?name=Linus"

.. test ignore start

To browse the demo pages, go to `the elements demo <http://localhost:8092/index.html>`_.

.. test ignore end

.. test end
```

#### Inline

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Look up a user
==============

.. test {"testId":"formats-rst","detectSteps":false}

#. Check that `the API <http://localhost:8092/status/200>`_ answers.

   .. step checkLink: http://localhost:8092/status/200

#. Send this request:

   .. code-block:: http

      GET http://localhost:8092/api/users?name=Linus

   .. step
      {"httpRequest": {
        "url": "http://localhost:8092/api/users",
        "request": {"parameters": {"name": "Linus"}},
        "response": {"body": {"name": "Linus"}}
      }}

#. To send the same request from a terminal, run:

   .. code-block:: bash
      :class: testIgnore

      curl "http://localhost:8092/api/users?name=Linus"

.. test ignore start

To browse the demo pages, go to `the elements demo <http://localhost:8092/index.html>`_.

.. step {"goTo":"http://localhost:8092/index.html"}

.. test ignore end

.. test end
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-rst",
      "steps": [
        {
          "checkLink": "http://localhost:8092/status/200"
        },
        {
          "httpRequest": {
            "url": "http://localhost:8092/api/users",
            "request": {
              "parameters": {
                "name": "Linus"
              }
            },
            "response": {
              "body": {
                "name": "Linus"
              }
            }
          }
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-rst
    steps:
      - checkLink: http://localhost:8092/status/200
      - httpRequest:
          url: http://localhost:8092/api/users
          request:
            parameters:
              name: Linus
          response:
            body:
              name: Linus
```

* Put a blank line before and after each statement. A `..` line that continues a paragraph is prose, not a comment.
* A comment holds its first line and the indented block below it, so a long step can span lines.
* `:class: testIgnore` keeps the `curl` block from becoming a `runCode` step. The ignore block skips the link to the elements demo.

### What detection finds

The link becomes a `checkLink` step. "Check that" doesn't open a link, so there's no `goTo` step. The `http` code block becomes an `httpRequest` step. Its URL keeps the query string. Detection doesn't add the `response` check, so the inline and standalone variants hold it.

## Echo text in DITA

This procedure uses [`goTo`](/docs/actions/goto), [`click`](/docs/actions/click), [`type`](/docs/actions/type), and [`find`](/docs/actions/find). The statements use each DITA form. Processing instructions hold a JSON body, a YAML body across lines, and XML-style attributes. HTML comments hold an attribute step and the `test end` statement. The `<data>` elements use single and double quotes, and one has a closing tag.

#### Prose

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="echo-text-dita">
  <title>Echo text back</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref>.</cmd></step>
      <step><cmd>Click <uicontrol>Type here:</uicontrol>.</cmd></step>
      <step><cmd>Type "Hello, DITA".</cmd></step>
      <step><cmd>Check that the page shows <b>Hello, DITA</b> below the field.</cmd></step>
    </steps>
    <postreq>
      <p>To fetch the page from a terminal instead, run:</p>
      <codeblock outputclass="language-bash">curl http://localhost:8092/type-echo.html</codeblock>
    </postreq>
  </taskbody>
</task>
```

#### Detected

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="echo-text-dita">
  <title>Echo text back</title>
  <?doc-detective test {"testId":"formats-dita","detectSteps":true} ?>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref>.</cmd></step>
      <step><cmd>Click <uicontrol>Type here:</uicontrol>.</cmd></step>
      <step><cmd>Type "Hello, DITA".</cmd></step>
      <step><cmd>Check that the page shows <b>Hello, DITA</b> below the field.</cmd></step>
    </steps>
    <postreq>
      <?doc-detective test ignore start?>
      <p>To fetch the page from a terminal instead, run:</p>
      <codeblock outputclass="language-bash">curl http://localhost:8092/type-echo.html</codeblock>
      <?doc-detective test ignore end?>
    </postreq>
  </taskbody>
  <!-- test end -->
</task>
```

#### Inline

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="echo-text-dita">
  <title>Echo text back</title>
  <?doc-detective test {"testId":"formats-dita","detectSteps":false} ?>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref>.</cmd>
        <?doc-detective step
          goTo: http://localhost:8092/type-echo.html
        ?></step>
      <step><cmd>Click <uicontrol>Type here:</uicontrol>.</cmd>
        <?doc-detective step click="Type here:" ?></step>
      <step><cmd>Type "Hello, DITA".</cmd>
        <!-- step type="Hello, DITA" --></step>
      <step><cmd>Check that the page shows <b>Hello, DITA</b> below the field.</cmd>
        <info><data name='doc-detective' value='step {"find":"Hello, DITA"}'></data></info></step>
    </steps>
    <postreq>
      <?doc-detective test ignore start?>
      <p>To fetch the page from a terminal instead, run:</p>
      <codeblock outputclass="language-bash">curl http://localhost:8092/type-echo.html</codeblock>
      <data name="doc-detective" value="step runShell='curl http://localhost:8092/type-echo.html'"/>
      <?doc-detective test ignore end?>
    </postreq>
  </taskbody>
  <!-- test end -->
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-dita",
      "steps": [
        {
          "goTo": "http://localhost:8092/type-echo.html"
        },
        {
          "click": "Type here:"
        },
        {
          "type": "Hello, DITA"
        },
        {
          "find": "Hello, DITA"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-dita
    steps:
      - goTo: http://localhost:8092/type-echo.html
      - click: "Type here:"
      - type: Hello, DITA
      - find: Hello, DITA
```

* A processing instruction starts with `<?doc-detective`.
* A `<data>` element's `name` is `doc-detective`, and its `value` holds the statement. Use one kind of quote for the attribute and the other inside it. Use `<data>` elements when your publishing workflow drops processing instructions, or when DITA-aware tools validate your topics.
* XML-style attributes take dot notation for nested fields, as in `httpRequest.url="…" httpRequest.method="get"`, and convert `true`, `false`, and numbers.
* A `<codeblock>` has no `testIgnore` marker, so the ignore block keeps the `curl` block from becoming a `runCode` step.

### What detection finds

The `<xref>` becomes a `goTo` step and a `checkLink` step. After "Click," the `<uicontrol>` becomes a `click` step and a `find` step. The quoted text becomes a `type` step, and the `<b>` text becomes a `find` step. For more DITA detection, see [DITA](/docs/test-docs/input-formats/dita).

## Ways to write a statement in Markdown

Each example checks two links, with every statement in one form. These examples have prose and inline variants only.

### `<!-- -->` with a JSON body

**Varies:** statement form · **Value:** `<!-- step {"checkLink": "…"} -->` · **Effect:** the form Doc Detective writes back in `.md` files.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Check the demo pages

1. Check that [the elements demo](http://localhost:8092/index.html) loads.
2. Check that [the type echo page](http://localhost:8092/type-echo.html) loads.
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
# Check the demo pages

<!-- test {"testId":"formats-md-html-comment-json","detectSteps":false} -->

1. Check that [the elements demo](http://localhost:8092/index.html) loads.
   <!-- step {"checkLink":"http://localhost:8092/index.html"} -->
2. Check that [the type echo page](http://localhost:8092/type-echo.html) loads.
   <!-- step {"checkLink":"http://localhost:8092/type-echo.html"} -->

<!-- test end -->
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-md-html-comment-json",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        },
        {
          "checkLink": "http://localhost:8092/type-echo.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-md-html-comment-json
    steps:
      - checkLink: http://localhost:8092/index.html
      - checkLink: http://localhost:8092/type-echo.html
```

### `<!-- -->` with a YAML body

**Varies:** statement body · **Value:** `<!-- step checkLink: … -->` · **Effect:** a one-key step reads as YAML. A test with several keys uses a flow mapping.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Check the demo pages

1. Check that [the elements demo](http://localhost:8092/index.html) loads.
2. Check that [the type echo page](http://localhost:8092/type-echo.html) loads.
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
# Check the demo pages

<!-- test {testId: formats-md-html-comment-yaml, detectSteps: false} -->

1. Check that [the elements demo](http://localhost:8092/index.html) loads.
   <!-- step checkLink: http://localhost:8092/index.html -->
2. Check that [the type echo page](http://localhost:8092/type-echo.html) loads.
   <!-- step checkLink: http://localhost:8092/type-echo.html -->

<!-- test end -->
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-md-html-comment-yaml",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        },
        {
          "checkLink": "http://localhost:8092/type-echo.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-md-html-comment-yaml
    steps:
      - checkLink: http://localhost:8092/index.html
      - checkLink: http://localhost:8092/type-echo.html
```

### `<!-- -->` with attributes

**Varies:** statement body · **Value:** `<!-- step checkLink="…" -->` · **Effect:** each XML-style attribute becomes a field. `false` and numbers convert to their types.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Check the demo pages

1. Check that [the elements demo](http://localhost:8092/index.html) loads.
2. Check that [the type echo page](http://localhost:8092/type-echo.html) loads.
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
# Check the demo pages

<!-- test testId="formats-md-html-comment-attributes" detectSteps=false -->

1. Check that [the elements demo](http://localhost:8092/index.html) loads.
   <!-- step checkLink="http://localhost:8092/index.html" -->
2. Check that [the type echo page](http://localhost:8092/type-echo.html) loads.
   <!-- step checkLink="http://localhost:8092/type-echo.html" -->

<!-- test end -->
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-md-html-comment-attributes",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        },
        {
          "checkLink": "http://localhost:8092/type-echo.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-md-html-comment-attributes
    steps:
      - checkLink: http://localhost:8092/index.html
      - checkLink: http://localhost:8092/type-echo.html
```

### `<!-- -->` across lines

**Varies:** statement layout · **Value:** a comment that spans lines · **Effect:** the keyword and its body can sit on separate lines.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Check the demo pages

1. Check that [the elements demo](http://localhost:8092/index.html) loads.
2. Check that [the type echo page](http://localhost:8092/type-echo.html) loads.
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
# Check the demo pages

<!--
test
{
  "testId": "formats-md-html-comment-multiline",
  "detectSteps": false
}
-->

1. Check that [the elements demo](http://localhost:8092/index.html) loads.
   <!--
   step
   {
     "checkLink": "http://localhost:8092/index.html"
   }
   -->
2. Check that [the type echo page](http://localhost:8092/type-echo.html) loads.
   <!--
   step
   {
     "checkLink": "http://localhost:8092/type-echo.html"
   }
   -->

<!--
test end
-->
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-md-html-comment-multiline",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        },
        {
          "checkLink": "http://localhost:8092/type-echo.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-md-html-comment-multiline
    steps:
      - checkLink: http://localhost:8092/index.html
      - checkLink: http://localhost:8092/type-echo.html
```

### `[comment]: # ( )`

**Varies:** statement form · **Value:** `[comment]: # (step {…})` · **Effect:** a link reference definition, which Markdown leaves out of the page, with the statement in parentheses.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Check the demo pages

1. Check that [the elements demo](http://localhost:8092/index.html) loads.
2. Check that [the type echo page](http://localhost:8092/type-echo.html) loads.
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
# Check the demo pages

[comment]: # (test {"testId":"formats-md-link-comment-parentheses","detectSteps":false})

1. Check that [the elements demo](http://localhost:8092/index.html) loads.
   [comment]: # (step {"checkLink":"http://localhost:8092/index.html"})
2. Check that [the type echo page](http://localhost:8092/type-echo.html) loads.
   [comment]: # (step {"checkLink":"http://localhost:8092/type-echo.html"})

[comment]: # (test end)
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-md-link-comment-parentheses",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        },
        {
          "checkLink": "http://localhost:8092/type-echo.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-md-link-comment-parentheses
    steps:
      - checkLink: http://localhost:8092/index.html
      - checkLink: http://localhost:8092/type-echo.html
```

### `[comment]: # ' '`

**Varies:** statement form · **Value:** `[comment]: # 'step {…}'` · **Effect:** single quotes leave the JSON body's double quotes free.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Check the demo pages

1. Check that [the elements demo](http://localhost:8092/index.html) loads.
2. Check that [the type echo page](http://localhost:8092/type-echo.html) loads.
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
# Check the demo pages

[comment]: # 'test {"testId":"formats-md-link-comment-single-quotes","detectSteps":false}'

1. Check that [the elements demo](http://localhost:8092/index.html) loads.
   [comment]: # 'step {"checkLink":"http://localhost:8092/index.html"}'
2. Check that [the type echo page](http://localhost:8092/type-echo.html) loads.
   [comment]: # 'step {"checkLink":"http://localhost:8092/type-echo.html"}'

[comment]: # 'test end'
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-md-link-comment-single-quotes",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        },
        {
          "checkLink": "http://localhost:8092/type-echo.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-md-link-comment-single-quotes
    steps:
      - checkLink: http://localhost:8092/index.html
      - checkLink: http://localhost:8092/type-echo.html
```

### `[comment]: # " "`

**Varies:** statement form · **Value:** `[comment]: # "step checkLink: …"` · **Effect:** double quotes can't hold a JSON body, so the statements use YAML.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Check the demo pages

1. Check that [the elements demo](http://localhost:8092/index.html) loads.
2. Check that [the type echo page](http://localhost:8092/type-echo.html) loads.
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
# Check the demo pages

[comment]: # "test {testId: formats-md-link-comment-double-quotes, detectSteps: false}"

1. Check that [the elements demo](http://localhost:8092/index.html) loads.
   [comment]: # "step checkLink: http://localhost:8092/index.html"
2. Check that [the type echo page](http://localhost:8092/type-echo.html) loads.
   [comment]: # "step checkLink: http://localhost:8092/type-echo.html"

[comment]: # "test end"
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-md-link-comment-double-quotes",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        },
        {
          "checkLink": "http://localhost:8092/type-echo.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-md-link-comment-double-quotes
    steps:
      - checkLink: http://localhost:8092/index.html
      - checkLink: http://localhost:8092/type-echo.html
```

## Ways to write a statement in MDX

### \`\` with a JSON body

**Varies:** statement form · **Value:** \`\` · **Effect:** the form Doc Detective writes back in `.mdx` files.

#### Prose

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Check the demo pages

1. Check that [the elements demo](http://localhost:8092/index.html) loads.
2. Check that [the type echo page](http://localhost:8092/type-echo.html) loads.
```

#### Inline

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
# Check the demo pages

{/* test {"testId":"formats-mdx-jsx-comment-json","detectSteps":false} */}

1. Check that [the elements demo](http://localhost:8092/index.html) loads.
   {/* step {"checkLink":"http://localhost:8092/index.html"} */}
2. Check that [the type echo page](http://localhost:8092/type-echo.html) loads.
   {/* step {"checkLink":"http://localhost:8092/type-echo.html"} */}

{/* test end */}
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-mdx-jsx-comment-json",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        },
        {
          "checkLink": "http://localhost:8092/type-echo.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-mdx-jsx-comment-json
    steps:
      - checkLink: http://localhost:8092/index.html
      - checkLink: http://localhost:8092/type-echo.html
```

### \`\` with a YAML body

**Varies:** statement body · **Value:** \`\` · **Effect:** a one-key step reads as YAML.

#### Prose

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Check the demo pages

1. Check that [the elements demo](http://localhost:8092/index.html) loads.
2. Check that [the type echo page](http://localhost:8092/type-echo.html) loads.
```

#### Inline

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
# Check the demo pages

{/* test {testId: formats-mdx-jsx-comment-yaml, detectSteps: false} */}

1. Check that [the elements demo](http://localhost:8092/index.html) loads.
   {/* step checkLink: http://localhost:8092/index.html */}
2. Check that [the type echo page](http://localhost:8092/type-echo.html) loads.
   {/* step checkLink: http://localhost:8092/type-echo.html */}

{/* test end */}
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-mdx-jsx-comment-yaml",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        },
        {
          "checkLink": "http://localhost:8092/type-echo.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-mdx-jsx-comment-yaml
    steps:
      - checkLink: http://localhost:8092/index.html
      - checkLink: http://localhost:8092/type-echo.html
```

### \`\` across lines

**Varies:** statement layout · **Value:** a JSX comment that spans lines · **Effect:** the keyword and its body can sit on separate lines.

#### Prose

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Check the demo pages

1. Check that [the elements demo](http://localhost:8092/index.html) loads.
2. Check that [the type echo page](http://localhost:8092/type-echo.html) loads.
```

#### Inline

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
# Check the demo pages

{/*
test
{
  "testId": "formats-mdx-jsx-comment-multiline",
  "detectSteps": false
}
*/}

1. Check that [the elements demo](http://localhost:8092/index.html) loads.
   {/*
   step
   {
     "checkLink": "http://localhost:8092/index.html"
   }
   */}
2. Check that [the type echo page](http://localhost:8092/type-echo.html) loads.
   {/*
   step
   {
     "checkLink": "http://localhost:8092/type-echo.html"
   }
   */}

{/*
test end
*/}
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-mdx-jsx-comment-multiline",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        },
        {
          "checkLink": "http://localhost:8092/type-echo.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-mdx-jsx-comment-multiline
    steps:
      - checkLink: http://localhost:8092/index.html
      - checkLink: http://localhost:8092/type-echo.html
```

### `[comment]: # ' '` in an MDX file

**Varies:** statement form · **Value:** `[comment]: # 'step {…}'` · **Effect:** works in MDX too, where HTML comments break the build.

#### Prose

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Check the demo pages

1. Check that [the elements demo](http://localhost:8092/index.html) loads.
2. Check that [the type echo page](http://localhost:8092/type-echo.html) loads.
```

#### Inline

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
# Check the demo pages

[comment]: # 'test {"testId":"formats-mdx-link-comment","detectSteps":false}'

1. Check that [the elements demo](http://localhost:8092/index.html) loads.
   [comment]: # 'step {"checkLink":"http://localhost:8092/index.html"}'
2. Check that [the type echo page](http://localhost:8092/type-echo.html) loads.
   [comment]: # 'step {"checkLink":"http://localhost:8092/type-echo.html"}'

[comment]: # 'test end'
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-mdx-link-comment",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        },
        {
          "checkLink": "http://localhost:8092/type-echo.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-mdx-link-comment
    steps:
      - checkLink: http://localhost:8092/index.html
      - checkLink: http://localhost:8092/type-echo.html
```

## Ways to write a statement in AsciiDoc

### `// ( )` with a JSON body

**Varies:** statement form · **Value:** `// (step {…})` · **Effect:** the statement sits in parentheses in a `//` comment at the start of a line.

#### Prose

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Check the demo pages

. Check that http://localhost:8092/index.html[the elements demo] loads.
. Check that http://localhost:8092/type-echo.html[the type echo page] loads.
```

#### Inline

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Check the demo pages

// (test {"testId":"formats-adoc-line-comment-json","detectSteps":false})

. Check that http://localhost:8092/index.html[the elements demo] loads.
+
// (step {"checkLink":"http://localhost:8092/index.html"})
. Check that http://localhost:8092/type-echo.html[the type echo page] loads.
+
// (step {"checkLink":"http://localhost:8092/type-echo.html"})

// (test end)
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-adoc-line-comment-json",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        },
        {
          "checkLink": "http://localhost:8092/type-echo.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-adoc-line-comment-json
    steps:
      - checkLink: http://localhost:8092/index.html
      - checkLink: http://localhost:8092/type-echo.html
```

### `// ( )` with a YAML body

**Varies:** statement body · **Value:** `// (step checkLink: …)` · **Effect:** a one-key step reads as YAML, and the test uses a flow mapping.

#### Prose

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Check the demo pages

. Check that http://localhost:8092/index.html[the elements demo] loads.
. Check that http://localhost:8092/type-echo.html[the type echo page] loads.
```

#### Inline

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Check the demo pages

// (test {testId: formats-adoc-line-comment-yaml, detectSteps: false})

. Check that http://localhost:8092/index.html[the elements demo] loads.
+
// (step checkLink: http://localhost:8092/index.html)
. Check that http://localhost:8092/type-echo.html[the type echo page] loads.
+
// (step checkLink: http://localhost:8092/type-echo.html)

// (test end)
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-adoc-line-comment-yaml",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        },
        {
          "checkLink": "http://localhost:8092/type-echo.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-adoc-line-comment-yaml
    steps:
      - checkLink: http://localhost:8092/index.html
      - checkLink: http://localhost:8092/type-echo.html
```

### `////` block across lines

**Varies:** statement form · **Value:** a `////` comment block · **Effect:** the whole block is the statement, so a step can span lines.

#### Prose

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Check the demo pages

. Check that http://localhost:8092/index.html[the elements demo] loads.
. Check that http://localhost:8092/type-echo.html[the type echo page] loads.
```

#### Inline

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Check the demo pages

////
(test
{
  "testId": "formats-adoc-block-comment-multiline",
  "detectSteps": false
})
////

. Check that http://localhost:8092/index.html[the elements demo] loads.
+
////
(step
{
  "checkLink": "http://localhost:8092/index.html"
})
////
. Check that http://localhost:8092/type-echo.html[the type echo page] loads.
+
////
(step
{
  "checkLink": "http://localhost:8092/type-echo.html"
})
////

////
(test end)
////
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-adoc-block-comment-multiline",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        },
        {
          "checkLink": "http://localhost:8092/type-echo.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-adoc-block-comment-multiline
    steps:
      - checkLink: http://localhost:8092/index.html
      - checkLink: http://localhost:8092/type-echo.html
```

## Ways to write a statement in HTML

### `<!-- -->` with a JSON body in HTML

**Varies:** statement body · **Value:** `<!-- step {"checkLink": "…"} -->` · **Effect:** the form Doc Detective writes back in HTML files.

#### Prose

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Check the demo pages</title></head>
<body>
<h1>Check the demo pages</h1>
<ol>
  <li>Check that <a href="http://localhost:8092/index.html">the elements demo</a> loads.</li>
  <li>Check that <a href="http://localhost:8092/type-echo.html">the type echo page</a> loads.</li>
</ol>
</body>
</html>
```

#### Inline

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Check the demo pages</title></head>
<body>
<h1>Check the demo pages</h1>
<!-- test {"testId":"formats-html-comment-json","detectSteps":false} -->
<ol>
  <li>Check that <a href="http://localhost:8092/index.html">the elements demo</a> loads.
    <!-- step {"checkLink":"http://localhost:8092/index.html"} --></li>
  <li>Check that <a href="http://localhost:8092/type-echo.html">the type echo page</a> loads.
    <!-- step {"checkLink":"http://localhost:8092/type-echo.html"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-html-comment-json",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        },
        {
          "checkLink": "http://localhost:8092/type-echo.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-html-comment-json
    steps:
      - checkLink: http://localhost:8092/index.html
      - checkLink: http://localhost:8092/type-echo.html
```

### Comment with a YAML body

**Varies:** statement body · **Value:** `<!-- step checkLink: … -->` · **Effect:** a one-key step reads as YAML, and the test uses a flow mapping.

#### Prose

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Check the demo pages</title></head>
<body>
<h1>Check the demo pages</h1>
<ol>
  <li>Check that <a href="http://localhost:8092/index.html">the elements demo</a> loads.</li>
  <li>Check that <a href="http://localhost:8092/type-echo.html">the type echo page</a> loads.</li>
</ol>
</body>
</html>
```

#### Inline

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Check the demo pages</title></head>
<body>
<h1>Check the demo pages</h1>
<!-- test {testId: formats-html-comment-yaml, detectSteps: false} -->
<ol>
  <li>Check that <a href="http://localhost:8092/index.html">the elements demo</a> loads.
    <!-- step checkLink: http://localhost:8092/index.html --></li>
  <li>Check that <a href="http://localhost:8092/type-echo.html">the type echo page</a> loads.
    <!-- step checkLink: http://localhost:8092/type-echo.html --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-html-comment-yaml",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        },
        {
          "checkLink": "http://localhost:8092/type-echo.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-html-comment-yaml
    steps:
      - checkLink: http://localhost:8092/index.html
      - checkLink: http://localhost:8092/type-echo.html
```

### `<!-- -->` with attributes in HTML

**Varies:** statement body · **Value:** `<!-- step checkLink="…" -->` · **Effect:** each XML-style attribute becomes a field.

#### Prose

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Check the demo pages</title></head>
<body>
<h1>Check the demo pages</h1>
<ol>
  <li>Check that <a href="http://localhost:8092/index.html">the elements demo</a> loads.</li>
  <li>Check that <a href="http://localhost:8092/type-echo.html">the type echo page</a> loads.</li>
</ol>
</body>
</html>
```

#### Inline

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Check the demo pages</title></head>
<body>
<h1>Check the demo pages</h1>
<!-- test testId="formats-html-comment-attributes" detectSteps=false -->
<ol>
  <li>Check that <a href="http://localhost:8092/index.html">the elements demo</a> loads.
    <!-- step checkLink="http://localhost:8092/index.html" --></li>
  <li>Check that <a href="http://localhost:8092/type-echo.html">the type echo page</a> loads.
    <!-- step checkLink="http://localhost:8092/type-echo.html" --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-html-comment-attributes",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        },
        {
          "checkLink": "http://localhost:8092/type-echo.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-html-comment-attributes
    steps:
      - checkLink: http://localhost:8092/index.html
      - checkLink: http://localhost:8092/type-echo.html
```

### `<!-- -->` across lines in HTML

**Varies:** statement layout · **Value:** a comment that spans lines · **Effect:** the keyword and its body can sit on separate lines.

#### Prose

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Check the demo pages</title></head>
<body>
<h1>Check the demo pages</h1>
<ol>
  <li>Check that <a href="http://localhost:8092/index.html">the elements demo</a> loads.</li>
  <li>Check that <a href="http://localhost:8092/type-echo.html">the type echo page</a> loads.</li>
</ol>
</body>
</html>
```

#### Inline

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Check the demo pages</title></head>
<body>
<h1>Check the demo pages</h1>
<!--
test
{
  "testId": "formats-html-comment-multiline",
  "detectSteps": false
}
-->
<ol>
  <li>Check that <a href="http://localhost:8092/index.html">the elements demo</a> loads.
    <!--
    step
    {
      "checkLink": "http://localhost:8092/index.html"
    }
    --></li>
  <li>Check that <a href="http://localhost:8092/type-echo.html">the type echo page</a> loads.
    <!--
    step
    {
      "checkLink": "http://localhost:8092/type-echo.html"
    }
    --></li>
</ol>
<!--
test end
-->
</body>
</html>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-html-comment-multiline",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        },
        {
          "checkLink": "http://localhost:8092/type-echo.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-html-comment-multiline
    steps:
      - checkLink: http://localhost:8092/index.html
      - checkLink: http://localhost:8092/type-echo.html
```

## Ways to write a statement in reStructuredText

### `..` with a JSON body

**Varies:** statement body · **Value:** `.. step {"checkLink": "…"}` · **Effect:** the statement fills one comment line, with a blank line before and after.

#### Prose

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Check the demo pages
====================

#. Check that `the elements demo <http://localhost:8092/index.html>`_ loads.

#. Check that `the type echo page <http://localhost:8092/type-echo.html>`_ loads.
```

#### Inline

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Check the demo pages
====================

.. test {"testId":"formats-rst-comment-json","detectSteps":false}

#. Check that `the elements demo <http://localhost:8092/index.html>`_ loads.

   .. step {"checkLink":"http://localhost:8092/index.html"}

#. Check that `the type echo page <http://localhost:8092/type-echo.html>`_ loads.

   .. step {"checkLink":"http://localhost:8092/type-echo.html"}

.. test end
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-rst-comment-json",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        },
        {
          "checkLink": "http://localhost:8092/type-echo.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-rst-comment-json
    steps:
      - checkLink: http://localhost:8092/index.html
      - checkLink: http://localhost:8092/type-echo.html
```

### `..` with a YAML body

**Varies:** statement body · **Value:** `.. step checkLink: …` · **Effect:** a one-key step reads as YAML, and the test uses a flow mapping.

#### Prose

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Check the demo pages
====================

#. Check that `the elements demo <http://localhost:8092/index.html>`_ loads.

#. Check that `the type echo page <http://localhost:8092/type-echo.html>`_ loads.
```

#### Inline

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Check the demo pages
====================

.. test {testId: formats-rst-comment-yaml, detectSteps: false}

#. Check that `the elements demo <http://localhost:8092/index.html>`_ loads.

   .. step checkLink: http://localhost:8092/index.html

#. Check that `the type echo page <http://localhost:8092/type-echo.html>`_ loads.

   .. step checkLink: http://localhost:8092/type-echo.html

.. test end
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-rst-comment-yaml",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        },
        {
          "checkLink": "http://localhost:8092/type-echo.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-rst-comment-yaml
    steps:
      - checkLink: http://localhost:8092/index.html
      - checkLink: http://localhost:8092/type-echo.html
```

### `..` across lines

**Varies:** statement layout · **Value:** an indented block below `.. step` · **Effect:** the indented lines belong to the comment, so the body can span lines.

#### Prose

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Check the demo pages
====================

#. Check that `the elements demo <http://localhost:8092/index.html>`_ loads.

#. Check that `the type echo page <http://localhost:8092/type-echo.html>`_ loads.
```

#### Inline

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Check the demo pages
====================

.. test
   {
     "testId": "formats-rst-comment-multiline",
     "detectSteps": false
   }

#. Check that `the elements demo <http://localhost:8092/index.html>`_ loads.

   .. step
      {
        "checkLink": "http://localhost:8092/index.html"
      }

#. Check that `the type echo page <http://localhost:8092/type-echo.html>`_ loads.

   .. step
      {
        "checkLink": "http://localhost:8092/type-echo.html"
      }

.. test end
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-rst-comment-multiline",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        },
        {
          "checkLink": "http://localhost:8092/type-echo.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-rst-comment-multiline
    steps:
      - checkLink: http://localhost:8092/index.html
      - checkLink: http://localhost:8092/type-echo.html
```

## Ways to write a statement in DITA

### `<?doc-detective ?>` with a JSON body

**Varies:** statement form · **Value:** `<?doc-detective step {…} ?>` · **Effect:** a processing instruction named `doc-detective` holds the statement.

#### Prose

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="formats-dita-pi-json">
  <title>Check the demo pages</title>
  <body>
    <ol>
      <li>Check that <xref href="http://localhost:8092/index.html" scope="external" format="html">the elements demo</xref> loads.</li>
      <li>Check that <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref> loads.</li>
    </ol>
  </body>
</topic>
```

#### Inline

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="formats-dita-pi-json">
  <title>Check the demo pages</title>
  <body>
    <?doc-detective test {"testId":"formats-dita-pi-json","detectSteps":false} ?>
    <ol>
      <li>Check that <xref href="http://localhost:8092/index.html" scope="external" format="html">the elements demo</xref> loads.
        <?doc-detective step {"checkLink":"http://localhost:8092/index.html"} ?></li>
      <li>Check that <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref> loads.
        <?doc-detective step {"checkLink":"http://localhost:8092/type-echo.html"} ?></li>
    </ol>
    <?doc-detective test end ?>
  </body>
</topic>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-dita-pi-json",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        },
        {
          "checkLink": "http://localhost:8092/type-echo.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-dita-pi-json
    steps:
      - checkLink: http://localhost:8092/index.html
      - checkLink: http://localhost:8092/type-echo.html
```

### `<?doc-detective ?>` with a YAML body across lines

**Varies:** statement body · **Value:** a YAML body across lines in `<?doc-detective test … ?>` · **Effect:** each key sits on its own line, indented like the markup around it.

#### Prose

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="formats-dita-pi-yaml-multiline">
  <title>Check the demo pages</title>
  <body>
    <ol>
      <li>Check that <xref href="http://localhost:8092/index.html" scope="external" format="html">the elements demo</xref> loads.</li>
      <li>Check that <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref> loads.</li>
    </ol>
  </body>
</topic>
```

#### Inline

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="formats-dita-pi-yaml-multiline">
  <title>Check the demo pages</title>
  <body>
    <?doc-detective test
      testId: formats-dita-pi-yaml-multiline
      detectSteps: false
    ?>
    <ol>
      <li>Check that <xref href="http://localhost:8092/index.html" scope="external" format="html">the elements demo</xref> loads.
        <?doc-detective step
        checkLink: http://localhost:8092/index.html
        ?></li>
      <li>Check that <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref> loads.
        <?doc-detective step
        checkLink: http://localhost:8092/type-echo.html
        ?></li>
    </ol>
    <?doc-detective test end ?>
  </body>
</topic>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-dita-pi-yaml-multiline",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        },
        {
          "checkLink": "http://localhost:8092/type-echo.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-dita-pi-yaml-multiline
    steps:
      - checkLink: http://localhost:8092/index.html
      - checkLink: http://localhost:8092/type-echo.html
```

Indent the body to match the markup around it. Doc Detective removes the indentation that every line of the body shares, so the keys only need to line up with each other.

### `<?doc-detective ?>` with attributes

**Varies:** statement body · **Value:** `<?doc-detective step checkLink="…" ?>` · **Effect:** each XML-style attribute becomes a field.

#### Prose

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="formats-dita-pi-attributes">
  <title>Check the demo pages</title>
  <body>
    <ol>
      <li>Check that <xref href="http://localhost:8092/index.html" scope="external" format="html">the elements demo</xref> loads.</li>
      <li>Check that <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref> loads.</li>
    </ol>
  </body>
</topic>
```

#### Inline

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="formats-dita-pi-attributes">
  <title>Check the demo pages</title>
  <body>
    <?doc-detective test testId="formats-dita-pi-attributes" detectSteps=false ?>
    <ol>
      <li>Check that <xref href="http://localhost:8092/index.html" scope="external" format="html">the elements demo</xref> loads.
        <?doc-detective step checkLink="http://localhost:8092/index.html" ?></li>
      <li>Check that <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref> loads.
        <?doc-detective step checkLink="http://localhost:8092/type-echo.html" ?></li>
    </ol>
    <?doc-detective test end ?>
  </body>
</topic>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-dita-pi-attributes",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        },
        {
          "checkLink": "http://localhost:8092/type-echo.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-dita-pi-attributes
    steps:
      - checkLink: http://localhost:8092/index.html
      - checkLink: http://localhost:8092/type-echo.html
```

### `<!-- -->` with attributes in DITA

**Varies:** statement form · **Value:** `<!-- step checkLink="…" -->` · **Effect:** an XML comment works the same as a processing instruction.

#### Prose

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="formats-dita-html-comment-attributes">
  <title>Check the demo pages</title>
  <body>
    <ol>
      <li>Check that <xref href="http://localhost:8092/index.html" scope="external" format="html">the elements demo</xref> loads.</li>
      <li>Check that <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref> loads.</li>
    </ol>
  </body>
</topic>
```

#### Inline

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="formats-dita-html-comment-attributes">
  <title>Check the demo pages</title>
  <body>
    <!-- test testId="formats-dita-html-comment-attributes" detectSteps=false -->
    <ol>
      <li>Check that <xref href="http://localhost:8092/index.html" scope="external" format="html">the elements demo</xref> loads.
        <!-- step checkLink="http://localhost:8092/index.html" --></li>
      <li>Check that <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref> loads.
        <!-- step checkLink="http://localhost:8092/type-echo.html" --></li>
    </ol>
    <!-- test end -->
  </body>
</topic>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-dita-html-comment-attributes",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        },
        {
          "checkLink": "http://localhost:8092/type-echo.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-dita-html-comment-attributes
    steps:
      - checkLink: http://localhost:8092/index.html
      - checkLink: http://localhost:8092/type-echo.html
```

### `<data>` with double quotes

**Varies:** statement form · **Value:** `value="step checkLink='…'"` · **Effect:** the attribute takes double quotes, so the values inside take single quotes.

#### Prose

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="formats-dita-data-double-quotes">
  <title>Check the demo pages</title>
  <body>
    <ol>
      <li>Check that <xref href="http://localhost:8092/index.html" scope="external" format="html">the elements demo</xref> loads.</li>
      <li>Check that <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref> loads.</li>
    </ol>
  </body>
</topic>
```

#### Inline

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="formats-dita-data-double-quotes">
  <title>Check the demo pages</title>
  <body>
    <data name="doc-detective" value="test testId='formats-dita-data-double-quotes' detectSteps=false"/>
    <ol>
      <li>Check that <xref href="http://localhost:8092/index.html" scope="external" format="html">the elements demo</xref> loads.
        <data name="doc-detective" value="step checkLink='http://localhost:8092/index.html'"/></li>
      <li>Check that <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref> loads.
        <data name="doc-detective" value="step checkLink='http://localhost:8092/type-echo.html'"/></li>
    </ol>
    <data name="doc-detective" value="test end"/>
  </body>
</topic>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-dita-data-double-quotes",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        },
        {
          "checkLink": "http://localhost:8092/type-echo.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-dita-data-double-quotes
    steps:
      - checkLink: http://localhost:8092/index.html
      - checkLink: http://localhost:8092/type-echo.html
```

### `<data>` with single quotes

**Varies:** statement form · **Value:** `value='step {"checkLink": "…"}'` · **Effect:** the attribute takes single quotes, so it can hold a JSON body.

#### Prose

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="formats-dita-data-single-quotes">
  <title>Check the demo pages</title>
  <body>
    <ol>
      <li>Check that <xref href="http://localhost:8092/index.html" scope="external" format="html">the elements demo</xref> loads.</li>
      <li>Check that <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref> loads.</li>
    </ol>
  </body>
</topic>
```

#### Inline

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="formats-dita-data-single-quotes">
  <title>Check the demo pages</title>
  <body>
    <data name="doc-detective" value='test {"testId":"formats-dita-data-single-quotes","detectSteps":false}'/>
    <ol>
      <li>Check that <xref href="http://localhost:8092/index.html" scope="external" format="html">the elements demo</xref> loads.
        <data name="doc-detective" value='step {"checkLink":"http://localhost:8092/index.html"}'/></li>
      <li>Check that <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref> loads.
        <data name="doc-detective" value='step {"checkLink":"http://localhost:8092/type-echo.html"}'/></li>
    </ol>
    <data name="doc-detective" value='test end'/>
  </body>
</topic>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-dita-data-single-quotes",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        },
        {
          "checkLink": "http://localhost:8092/type-echo.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-dita-data-single-quotes
    steps:
      - checkLink: http://localhost:8092/index.html
      - checkLink: http://localhost:8092/type-echo.html
```

## `testIgnore` permutations

Each example has a `bash` code block that detection would turn into a `runCode` step. The detected variants show what keeps it from running.

### `testIgnore` after a Markdown fence language

**Varies:** code fence meta · **Value:** ` ```bash testIgnore ` · **Effect:** detection skips the block.

#### Prose

#### Markdown

**`prose.md`**

````markdown title="prose.md"
# Check the demo pages

1. Check that [the elements demo](http://localhost:8092/index.html) loads.

To fetch the page from a terminal instead, run:

```bash testIgnore
curl http://localhost:8092/index.html
```
````

#### Detected

#### Markdown

**`detected.md`**

````markdown title="detected.md"
# Check the demo pages

<!-- test {"testId":"formats-md-testignore","detectSteps":true} -->

1. Check that [the elements demo](http://localhost:8092/index.html) loads.

To fetch the page from a terminal instead, run:

```bash testIgnore
curl http://localhost:8092/index.html
```

<!-- test end -->
````

#### Inline

#### Markdown

**`inline.md`**

````markdown title="inline.md"
# Check the demo pages

<!-- test {"testId":"formats-md-testignore","detectSteps":false} -->

1. Check that [the elements demo](http://localhost:8092/index.html) loads.
   <!-- step {"checkLink":"http://localhost:8092/index.html"} -->

To fetch the page from a terminal instead, run:

```bash testIgnore
curl http://localhost:8092/index.html
```

<!-- test end -->
````

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-md-testignore",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-md-testignore
    steps:
      - checkLink: http://localhost:8092/index.html
```

### `testIgnore` after an MDX fence language

**Varies:** code fence meta · **Value:** ` ```bash testIgnore ` · **Effect:** detection skips the block.

#### Prose

#### MDX

**`prose.mdx`**

````mdx title="prose.mdx"
# Check the demo pages

1. Check that [the elements demo](http://localhost:8092/index.html) loads.

To fetch the page from a terminal instead, run:

```bash testIgnore
curl http://localhost:8092/index.html
```
````

#### Detected

#### MDX

**`detected.mdx`**

````mdx title="detected.mdx"
# Check the demo pages

{/* test {"testId":"formats-mdx-testignore","detectSteps":true} */}

1. Check that [the elements demo](http://localhost:8092/index.html) loads.

To fetch the page from a terminal instead, run:

```bash testIgnore
curl http://localhost:8092/index.html
```

{/* test end */}
````

#### Inline

#### MDX

**`inline.mdx`**

````mdx title="inline.mdx"
# Check the demo pages

{/* test {"testId":"formats-mdx-testignore","detectSteps":false} */}

1. Check that [the elements demo](http://localhost:8092/index.html) loads.
   {/* step {"checkLink":"http://localhost:8092/index.html"} */}

To fetch the page from a terminal instead, run:

```bash testIgnore
curl http://localhost:8092/index.html
```

{/* test end */}
````

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-mdx-testignore",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-mdx-testignore
    steps:
      - checkLink: http://localhost:8092/index.html
```

### `testIgnore` in AsciiDoc source attributes

**Varies:** listing attributes · **Value:** `[source,bash,testIgnore]` · **Effect:** detection skips the listing.

#### Prose

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Check the demo pages

. Check that http://localhost:8092/index.html[the elements demo] loads.

To fetch the page from a terminal instead, run:

[source,bash,testIgnore]
----
curl http://localhost:8092/index.html
----
```

#### Detected

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Check the demo pages

// (test {"testId":"formats-adoc-testignore","detectSteps":true})

. Check that http://localhost:8092/index.html[the elements demo] loads.

To fetch the page from a terminal instead, run:

[source,bash,testIgnore]
----
curl http://localhost:8092/index.html
----

// (test end)
```

#### Inline

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Check the demo pages

// (test {"testId":"formats-adoc-testignore","detectSteps":false})

. Check that http://localhost:8092/index.html[the elements demo] loads.
+
// (step {"checkLink":"http://localhost:8092/index.html"})

To fetch the page from a terminal instead, run:

[source,bash,testIgnore]
----
curl http://localhost:8092/index.html
----

// (test end)
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-adoc-testignore",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-adoc-testignore
    steps:
      - checkLink: http://localhost:8092/index.html
```

### `:class: testIgnore` on a reStructuredText code block

**Varies:** directive option · **Value:** `:class: testIgnore` · **Effect:** detection skips the code block.

#### Prose

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Check the demo pages
====================

#. Check that `the elements demo <http://localhost:8092/index.html>`_ loads.

To fetch the page from a terminal instead, run:

.. code-block:: bash
   :class: testIgnore

   curl http://localhost:8092/index.html
```

#### Detected

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Check the demo pages
====================

.. test {"testId":"formats-rst-testignore","detectSteps":true}

#. Check that `the elements demo <http://localhost:8092/index.html>`_ loads.

To fetch the page from a terminal instead, run:

.. code-block:: bash
   :class: testIgnore

   curl http://localhost:8092/index.html

.. test end
```

#### Inline

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Check the demo pages
====================

.. test {"testId":"formats-rst-testignore","detectSteps":false}

#. Check that `the elements demo <http://localhost:8092/index.html>`_ loads.

   .. step {"checkLink":"http://localhost:8092/index.html"}

To fetch the page from a terminal instead, run:

.. code-block:: bash
   :class: testIgnore

   curl http://localhost:8092/index.html

.. test end
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-rst-testignore",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-rst-testignore
    steps:
      - checkLink: http://localhost:8092/index.html
```

### An ignore block in HTML

**Varies:** code block marker · **Value:** an ignore block around the block · **Effect:** HTML has no `testIgnore` marker, so the ignore block keeps detection off the code.

#### Prose

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Check the demo pages</title></head>
<body>
<h1>Check the demo pages</h1>
<ol>
  <li>Check that <a href="http://localhost:8092/index.html">the elements demo</a> loads.</li>
</ol>
<p>To fetch the page from a terminal instead, run:</p>
<pre><code class="language-bash">curl http://localhost:8092/index.html</code></pre>
</body>
</html>
```

#### Detected

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Check the demo pages</title></head>
<body>
<h1>Check the demo pages</h1>
<!-- test {"testId":"formats-html-code-ignore-block","detectSteps":true} -->
<ol>
  <li>Check that <a href="http://localhost:8092/index.html">the elements demo</a> loads.</li>
</ol>
<!-- test ignore start -->
<p>To fetch the page from a terminal instead, run:</p>
<pre><code class="language-bash">curl http://localhost:8092/index.html</code></pre>
<!-- test ignore end -->
<!-- test end -->
</body>
</html>
```

#### Inline

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Check the demo pages</title></head>
<body>
<h1>Check the demo pages</h1>
<!-- test {"testId":"formats-html-code-ignore-block","detectSteps":false} -->
<ol>
  <li>Check that <a href="http://localhost:8092/index.html">the elements demo</a> loads.
    <!-- step {"checkLink":"http://localhost:8092/index.html"} --></li>
</ol>
<!-- test ignore start -->
<p>To fetch the page from a terminal instead, run:</p>
<pre><code class="language-bash">curl http://localhost:8092/index.html</code></pre>
<!-- test ignore end -->
<!-- test end -->
</body>
</html>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-html-code-ignore-block",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-html-code-ignore-block
    steps:
      - checkLink: http://localhost:8092/index.html
```

### An ignore block in DITA

**Varies:** code block marker · **Value:** an ignore block around the `<codeblock>` · **Effect:** DITA has no `testIgnore` marker, so the ignore block keeps detection off the code.

#### Prose

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="formats-dita-code-ignore-block">
  <title>Check the demo pages</title>
  <body>
    <ol>
      <li>Check that <xref href="http://localhost:8092/index.html" scope="external" format="html">the elements demo</xref> loads.</li>
    </ol>
    <p>To fetch the page from a terminal instead, run:</p>
    <codeblock outputclass="language-bash">curl http://localhost:8092/index.html</codeblock>
  </body>
</topic>
```

#### Detected

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="formats-dita-code-ignore-block">
  <title>Check the demo pages</title>
  <body>
    <data name="doc-detective" value='test {"testId":"formats-dita-code-ignore-block","detectSteps":true}'/>
    <ol>
      <li>Check that <xref href="http://localhost:8092/index.html" scope="external" format="html">the elements demo</xref> loads.</li>
    </ol>
    <data name="doc-detective" value="test ignore start"/>
    <p>To fetch the page from a terminal instead, run:</p>
    <codeblock outputclass="language-bash">curl http://localhost:8092/index.html</codeblock>
    <data name="doc-detective" value="test ignore end"/>
    <data name="doc-detective" value="test end"/>
  </body>
</topic>
```

#### Inline

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="formats-dita-code-ignore-block">
  <title>Check the demo pages</title>
  <body>
    <data name="doc-detective" value='test {"testId":"formats-dita-code-ignore-block","detectSteps":false}'/>
    <ol>
      <li>Check that <xref href="http://localhost:8092/index.html" scope="external" format="html">the elements demo</xref> loads.
        <data name="doc-detective" value='step {"checkLink":"http://localhost:8092/index.html"}'/></li>
    </ol>
    <data name="doc-detective" value="test ignore start"/>
    <p>To fetch the page from a terminal instead, run:</p>
    <codeblock outputclass="language-bash">curl http://localhost:8092/index.html</codeblock>
    <data name="doc-detective" value="test ignore end"/>
    <data name="doc-detective" value="test end"/>
  </body>
</topic>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "formats-dita-code-ignore-block",
      "steps": [
        {
          "checkLink": "http://localhost:8092/index.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: formats-dita-code-ignore-block
    steps:
      - checkLink: http://localhost:8092/index.html
```