Skip to content

server(docs): Highlight the with_owned/2 example - #173

Merged
tony merged 2 commits into
mainfrom
docs/with-owned-example
Dec 5, 2026
Merged

tony merged 2 commits into
mainfrom
docs/with-owned-example

Conversation

@tony

@tony tony commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Closes #170.

What changed, and why

The original docstring rendered as code in HexDocs, but the libtmux.org reference joined the alias and callback into prose. The example now has an elixir fence and an Examples heading. A reader can copy one block that creates a private session, takes a snapshot and lets Server.with_owned/2 retire the server.

The site adapter fix also supports already-published indented docstrings. Companion pull request

This source fix can land independently of the adapter. Its docstring and changelog also apply cleanly alongside #169 and #172.

Checks run

  • Built ExDoc with warnings treated as errors and verified its local links. The candidate build took 3.00 s.
  • Rendered the fenced source through both site adapters. Each produced the same highlighted HTML, including the blank line and callback indentation.
  • Ran the displayed example on Linux with tmux 3.8. The snapshot contained the demo session and its pane. The socket directory and the observed processes disappeared after the callback. The example took 0.65 s.

Rebased checks

The full core suite passed 477 cases on tmux 3.8 in 38.49 s after rebasing onto #172. The unsupported-release case was skipped.

The published preview built from 323d660c shows one syntax-highlighted Elixir block. The example is byte-identical on the rebased head 8b039984, including the blank line and callback indentation. Rendered example

Tool use

Codex edited the docstring and executed the example. A separate Codex reviewer compared the rendered lines with the source.

tony added 2 commits December 5, 2026 11:55
why: The reference site renders the indented callback as prose, which
joins statements when a reader copies the example.

what:
- Mark the callback as Elixir under the examples heading.
- Name the pane command so the copied program fits within 80 columns.
why: Readers can now copy the highlighted callback from the reference.

what:
- Record the example formatting change under documentation.

This branch had an error being deployed

1 failed deployment
docs-preview — 8b039984 Deployed Dec 5, 2026 by tony via publish (pr-173, pr, false, true, elixir) / publish #364
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

with_owned/2 example loses formatting on libtmux.org

1 participant