Add !!type and |text to [^element^] shorthand
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 806
- Forks
- 434
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 32
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the parser or entry point for the [^element^] shorthand and compare it with the existing [= =] and {{ }} shorthand handling. Add support for !! type disambiguation and | display text for the listed element reference types, while preserving current inference and behavior. Done means all examples work without breaking existing shorthand syntax.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100