Skip to content

Preserve the result and guide links after the final reference example #396

Backlog

Description

@tony

Summary

The shared Markdown parser drops the paragraph after the last code block in an Examples section. On the released Elixir LibTmux.Server page, that paragraph gives the expected pane IDs and links to the capture and owned-server guides. Released source

Reproduction

Pass this docstring to parseElixirDoc and inspect doc.examples. The same result occurs with a following ## Related heading.

An example.

## Examples

Read a line.

```elixir
IO.gets(:stdio, "")
```

Expected output and a [guide](first-task.html).

The model contains the Elixir code and the introduction “Read a line.” The final sentence and its link disappear. With two examples, the parser attaches all intervening prose to the second introduction, including the first example’s result.

Expected

The HTML reference and Markdown export should keep the text and links after each example in their authored order, including when the section ends at a heading or the end of the docstring. The existing example outro field can carry trailing prose to both renderers. Model · HTML renderer · Markdown export

Evidence

The fenced reproduction also loses its trailing paragraph on the parent of the indented-example fix. The shared parser has buffered lines for the next block since September 5. It clears that buffer at a heading and returns at end of input. Cover both boundaries and an intervening paragraph with a link. Parser history · Indented examples

Activity

  1. added
    bug
    documentation
    p2
    area:examples
    topic:api
    topic:examples
    on Dec 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:examplesbugdocumentationp2topic:apitopic:examples

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions