Skip to content

Bracket-like prose and examples are converted into broken markdown links #62

Description

@skatkov

Summary

Several generated pages contain prose or examples that are being interpreted as markdown links when they should remain literal text or code.

The markdown is syntactically valid, but the rendered result is wrong and often produces broken local links.

Reproduction

  1. Run rake vendor:setup.
  2. Run rake vendor:docs:minitest and rake vendor:docs:rails.
  3. Open the generated files listed below.
  4. Inspect the rendered output and the emitted markdown around the examples.

Examples

  • vendor/docs/rails/ActionDispatch/Cookies.md:76
    • Emits: [www.example.com](www.example.com)
    • www.example.com should remain literal example text, not a relative local link.
  • vendor/docs/rails/ActionController/Renderers.md:29
    • Emits: [Mime](:csv)
    • Mime[:csv] should remain code/plain text, not a markdown link to :csv.
  • vendor/docs/minitest/Minitest/Runnable.md:35
    • Emits: [options](:include) and [options](:exclude)
    • :include and :exclude should not become link targets.
  • vendor/docs/rails/ActionView/Helpers/DateHelper.md:7
    • Emits: \b[irthday](month)
  • vendor/docs/rails/ActionView/Helpers/DateHelper.md:11
    • Emits: \d[ate](month)
    • Both of those are visibly mangled words in the final markdown.

Actual Result

Bracket-like text in prose/examples is being converted into clickable markdown links or otherwise mangled text.

Expected Result

These cases should remain literal text or code spans unless there is a real documentation target.

Specifically:

  • bare hostnames should not become relative local links,
  • Symbol examples like :csv, :include, and :exclude should not become links,
  • partial word fragments should not become links.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions