pimd icon indicating copy to clipboard operation
pimd copied to clipboard

Trailing processing instructions should be related to <img>/<a>

Open hagenburger opened this issue 6 years ago • 1 comments

Current situation

Usually processing instructions have defined the paragraph as their element:

Lorem <?pi?> ipsum

pi.element refers to the <p> which will contain Lorem ipsum.

Proposed change

When a processing instruction is following a link/image, it would be useful if it’s pi.element refers to the <a>/<img>:

Lorem [ipsum](ipsum.html)<?pi?> dolor
Lorem ![ipsum](ipsum.jpg)<?pi?> dolor

Example usage

This way it would be easy to access attributes like adding an ID, classes, or attributes:

Lorem ![ipsum](ipsum.jpg)<?: #my-image ?> dolor
Lorem ![ipsum](ipsum.jpg)<?: .big-image ?> dolor
Lorem ![ipsum](ipsum.jpg)<?: [width=100%] ?> dolor

hagenburger avatar Jul 01 '18 08:07 hagenburger