djot icon indicating copy to clipboard operation
djot copied to clipboard

Blockquote attribution / citation

Open toastal opened this issue 1 year ago • 2 comments

> denotes a <blockquote> in Markdown/Djot

The blockquote element represents a section that is quoted from another source.

Content inside a blockquote must be quoted from another source, whose address, if it has one, may be cited in the cite attribute.

— W3C HTML spec, https://html.spec.whatwg.org/multipage/grouping-content.html#the-blockquote-element

As a user, I want syntax explicitly support attributing and citing blockquotes. This not only matches the HTML spec closer, but it's good to cite your sources! With explicit syntax it would be much easier to support styling that author information instead of it being in some generic <p> that can't reasonable be selected (made up CSS selector: blockquote + p:has(:where(text-begins-with("—"), text-begins-with("--"))) or the last paragraph inside if nested. The point being having a consistent pattern will make it easier to group together with the blockquote and handle the blockquote accordingly instead of using ad-hoc conventions.


Prior art: Asciidoctor

AsciiDoc Block syntax

[quote,Monty Python and the Holy Grail]
____
Dennis: Come and see the violence inherent in the system. Help! Help! I'm being repressed!

King Arthur: Bloody peasant!

Dennis: Oh, what a giveaway! Did you hear that? Did you hear that, eh? That's what I'm on about! Did you see him repressing me? You saw him, Didn't you?
____

AsciiDoc Markdown-style

> I hold it that a little rebellion now and then is a good thing,
> and as necessary in the political world as storms in the physical.
> -- Thomas Jefferson, Papers of Thomas Jefferson: Volume 11

Prior art: reStructuredText

As a great paleontologist once said,

    This theory, that is mine, is mine.

    -- Anne Elk (Miss)

This all said, (em dash) seems to be the preferred symbol for quotation attribution and Djot uses triple hyphen, ---, for that symbol (and base AsciiDoc uses --).

For rendering, it still seems a bit unclear if attribution should live inside or outside of the <blockquote>, wrapped in a <div> or in a <figure> with <figcation> to cite (and there's the <cite> tag itself).

toastal avatar Jan 20 '23 09:01 toastal