# Fenced blockquote

**URL:** <https://talk.commonmark.org/t/fenced-blockquote/2370>\
**Category:** Extensions\
**Created:** [March 16, 2017, 1:49pm UTC](https://talk.commonmark.org/t/fenced-blockquote/2370 "2017-03-16T13:49:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![xenoterracide](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/xenoterracide/32/1087_2.png) [@xenoterracide](https://talk.commonmark.org/u/xenoterracide)\
**Post date:** [March 16, 2017, 1:49pm UTC](https://talk.commonmark.org/t/fenced-blockquote/2370/1 "2017-03-16T13:49:42Z")

</div>

Allow this syntax

```auto
>>>
quoting a parent, and their code

~~~
class Foo {
}
~~~

is still part of the quote
>>>

```

or this

```auto
>>>
hello world

my name is hal
>>>

```

would generate

```auto
<blockquote>
   <p>hello world</p>
   <p>my name is hal</p>
</blockquote>

```

it’s fundamentaly equivalent to just writing

```auto
> hello world

> my name is hal

```

which of course is simple enough in that use case but if you were copying multiple paragraphs from an alternate source in a tiny web text editor, it might be hard to go back and add `>` at the correct points.

I could swear I’ve done this in an existing markdown implementation, but I’m not sure which one. I wouldn’t mind if this were part of the core spec, but I’m assuming that maybe things need to be extensions first?

---

<div class="post-metadata">

**Author:** ![Crissov](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/crissov/32/1455_2.png) [@Crissov](https://talk.commonmark.org/u/Crissov)\
**Post date:** [October 8, 2018, 10:00pm UTC](https://talk.commonmark.org/t/fenced-blockquote/2370/2 "2018-10-08T22:00:26Z")

</div>

Just for the record, this is (or used to be) supported on [Gitlab](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/markdown.md#multiline-blockquote) and was apparently inherited from [Redcarpet](https://github.com/vmg/redcarpet) which is a Ruby binding of [Sundown](https://github.com/vmg/sundown) which was based upon [Upskirt alias libsoldout](http://fossil.instinctive.eu/libsoldout/home), although I cannot find this syntax extension mentioned in the documentation of any of them. Also, no implementation featured in Babelmark 2 or 3 handles this as proposed (at least without an optional extension).

---

<div class="post-metadata">

**Author:** ![chrisalley](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/chrisalley/32/906_2.png) [@chrisalley](https://talk.commonmark.org/u/chrisalley)\
**Post date:** [October 8, 2018, 11:20pm UTC](https://talk.commonmark.org/t/fenced-blockquote/2370/3 "2018-10-08T23:20:19Z")

</div>

I’ve added the proposed alternative syntax extensions to the [list of proposed extensions](https://github.com/commonmark/CommonMark/wiki/Proposed-Extensions).

I think this would be a useful extension for authors who quote long sections of text. However, a good editor could add or remove the `>` character to/from the start of every paragraph with a keyboard shortcut. This is arguably more readable than scrolling up to find the start of a large block (which could cover several pages). Perhaps effort should be directed at enhancing editors instead? Given that the existing blockquote syntax is already supported by every implementation, that might be preferable.

---

<div class="post-metadata">

**Author:** ![salim](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/salim/32/1988_2.png) [@salim](https://talk.commonmark.org/u/salim)\
**Post date:** [June 29, 2020, 6:05pm UTC](https://talk.commonmark.org/t/fenced-blockquote/2370/4 "2020-06-29T18:05:23Z")

</div>

GitLab Flavored Markdown still [supports](https://gitlab.com/help/user/markdown.md#multiline-blockquote) fenced blockquotes.

It would be awesome to have a dedicated extension (implemented in Pandoc) to properly support conversion to/from GitLab Flavored Markdown.

---

<div class="post-metadata">

**Author:** ![hubgit](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/hubgit/32/2236_2.png) [@hubgit](https://talk.commonmark.org/u/hubgit)\
**Post date:** [May 2, 2021, 9:53am UTC](https://talk.commonmark.org/t/fenced-blockquote/2370/5 "2021-05-02T09:53:02Z")

</div>

Having just independently “invented” fenced blockquotes (“invented” is a bit of a bold claim, as it seems like quite an obvious syntax given that fenced code blocks already exist), this seems like a good idea.

In particular, I’d like to see the ability to optionally specify a source URL to go in the `cite` attribute.

For example:

```markdown
>>> https://en.wikipedia.org/wiki/Markdown
From 2012, a group of people, including Jeff Atwood and John MacFarlane, launched what Atwood characterized as a standardization effort.

A community website now aims to "document various tools and resources available to document authors and developers, 
as well as implementors of the various Markdown implementations".
>>>

```

```html
<blockquote cite="https://en.wikipedia.org/wiki/Markdown">
<p>From 2012, a group of people, including Jeff Atwood and John MacFarlane, launched what Atwood characterized as a standardization effort.</p>
<p>A community website now aims to "document various tools and resources available to document authors and developers, 
as well as implementors of the various Markdown implementations".</p>
</blockquote>

```

One use case for this is quoting passages copied from PDFs, where newlines can be inserted amongst the text.

---

<div class="post-metadata">

**Author:** ![hubgit](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/hubgit/32/2236_2.png) [@hubgit](https://talk.commonmark.org/u/hubgit)\
**Post date:** [May 21, 2021, 8:34pm UTC](https://talk.commonmark.org/t/fenced-blockquote/2370/6 "2021-05-21T20:34:06Z")

</div>

Having realised that `>>>` is indistinguishable from a block quote nested 3 levels deep (at least without the introduction of a rule that takes into account the surrounding lines as context), I’ve switched to using `<<<` instead.

This has the added benefit of implying transclusion from the source URL:

```nohighlight
<<< https://en.wikipedia.org/wiki/Markdown
From 2012, a group of people, including Jeff Atwood and John MacFarlane, launched what Atwood characterized as a standardization effort.

A community website now aims to "document various tools and resources available to document authors and developers, 
as well as implementors of the various Markdown implementations".
<<<

```

One useful addition might be to allow a title for the source, in regular link format, in case it’s useful to display a link to the source in the output:

```nohighlight
<<< [Markdown](https://en.wikipedia.org/wiki/Markdown)
From 2012, a group of people, including Jeff Atwood and John MacFarlane, launched what Atwood characterized as a standardization effort.

A community website now aims to "document various tools and resources available to document authors and developers, 
as well as implementors of the various Markdown implementations".
<<<

```
