Skip to content

Add !!type and |text to [^element^] shorthand #5272

@marcoscaceres

Description

@marcoscaceres

The [^element^] shorthand (ReSpec's HTML-safe equivalent of Bikeshed's <{element}>) currently infers the link type from structure but doesn't support explicit type disambiguation or display text override.

For consistency with other ReSpec bracket shorthands ([= =], {{ }}), add:

Type disambiguation:

  • [^ iframe!!element ^] — explicit element type
  • [^ input/type!!element-attr ^] — explicit element-attr type
  • Valid types: element, element-attr, attr-value, element-state, element-sub

Display text:

  • [^ iframe|the iframe element ^] — custom display text

All existing behavior unchanged (no breaking changes).

Part of the Bikeshed inline shorthand parity effort.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions