Skip to content

Commit c9451f2

Browse files
sethvincentwooorm
authored andcommitted
Add support for <blockquote>
Closes GH-15.
1 parent 1610c2c commit c9451f2

File tree

5 files changed

+23
-0
lines changed

5 files changed

+23
-0
lines changed

handlers/blockquote.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use strict';
2+
3+
module.exports = blockquote;
4+
5+
var all = require('../all');
6+
7+
function blockquote(h, node) {
8+
return h(node, 'blockquote', all(h, node));
9+
}

handlers/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ exports.br = require('./break');
1919
exports.p = require('./paragraph');
2020
exports.hr = require('./thematic-break');
2121
exports.pre = require('./code');
22+
exports.blockquote = require('./blockquote');
2223

2324
exports.h1 = exports.h2 = exports.h3 =
2425
exports.h4 = exports.h5 = exports.h6 = require('./heading');

tests/fixtures/blockquote/index.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<blockquote><h1>This is a header in a blockquote.</h1></blockquote>
2+
3+
<p>paragraph</p>
4+
5+
<blockquote><p>This is a blockquote.</p></blockquote>

tests/fixtures/blockquote/index.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"fragment": true
3+
}

tests/fixtures/blockquote/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
> # This is a header in a blockquote.
2+
3+
paragraph
4+
5+
> This is a blockquote.

0 commit comments

Comments
 (0)