Skip to content

docs/api: telField and vitePreloadTag examples contain literal \n and render as one line #4620

Closed

Description

@bpamiri

Two entries in docs/api/v4.2.0.json store a literal backslash-n (\n, two characters) in extended.docs instead of real newlines:

Function Literal \n sequences
telField 12
vitePreloadTag 2

The API generator passes extended.docs through as HTML, so each example renders as a single long line with visible \n text. On https://api.wheels.dev/v4-2-0/view-helpers/telfield/ the code example is one 677-character line.

These docs are generated from the framework's inline documentation annotations, so the likely source is how those two functions' doc examples are written (an escaped newline in the annotation) or how the JSON is built.

To do:

  • Find the source annotation for telField and vitePreloadTag and fix the newlines there, or fix the extraction if it escapes them.
  • Check the other versions' JSON for the same pattern.
  • The committed web/sites/api/src/content/docs/v4-2-0/... pages change at the next docs regeneration.

Found while investigating #4616, which is about long code lines overflowing the page; that fix contains the overflow but doesn't fix this content.

Activity

  1. bpamiri commented on Oct 19, 2026

    @bpamiri
    CollaboratorAuthor

    Correction after tracing it:

    • telField is the real bug. Its source example, vendor/wheels/public/docs/reference/controller/telfield.txt, is a single 677-byte line containing 12 literal \n and 5 literal \t (backslash sequences), and no real newlines. The docs pipeline copies it faithfully. The bug is in the published docs/api/v4.1.0.json and v4.2.0.json.
    • vitePreloadTag is fine. Its two \n sit inside a quoted string showing the function's return value, and that page already renders on multiple lines. Decoding them would break the example, so it stays as is.

    The fix will decode the escapes in telfield.txt, so future builds are right. It will also apply an erratum to the 4.1.0 and 4.2.0 docs, patching that one docs value and regenerating the single affected view-helpers/telfield.md page per version.

  2. added a commit that references this issue on Oct 19, 2026
    a34d0dc
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions