Skip to content

Commit a26b1c5

Browse files
committed
Add support for main block-level elements to block-content.
* sectioning elements: `<article>`, `<aside>`, `<nav>`, `<section>` * `<html>` * `<body>` * `<main>` * `<footer>` * `<header>` * `<hgroup>`
1 parent d59cfb1 commit a26b1c5

File tree

17 files changed

+158
-1
lines changed

17 files changed

+158
-1
lines changed

lib/handlers/index.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,17 @@ exports.thead =
2727
exports.tbody =
2828
exports.tfoot = children;
2929

30-
exports.address = wrapped;
30+
exports.address =
31+
exports.article =
32+
exports.aside =
33+
exports.body =
34+
exports.footer =
35+
exports.header =
36+
exports.hgroup =
37+
exports.html =
38+
exports.main =
39+
exports.nav =
40+
exports.section = wrapped;
3141

3242
exports.ol = exports.ul = require('./list');
3343
exports.table = require('./table');
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<article class="film_review">
2+
<header>
3+
<h2>Jurassic Park</h2>
4+
</header>
5+
<section class="main_review">
6+
<p>Dinos were great!</p>
7+
</section>
8+
<section class="user_reviews">
9+
<article class="user_review">
10+
<p>Way too scary for me.</p>
11+
<footer>
12+
<p>
13+
Posted on
14+
<time datetime="2015-05-16 19:00">May 16</time>
15+
by Lisa.
16+
</p>
17+
</footer>
18+
</article>
19+
<article class="user_review">
20+
<p>I agree, dinos are my favorite.</p>
21+
<footer>
22+
<p>
23+
Posted on
24+
<time datetime="2015-05-17 19:00">May 17</time>
25+
by Tom.
26+
</p>
27+
</footer>
28+
</article>
29+
</section>
30+
<footer>
31+
<p>
32+
Posted on
33+
<time datetime="2015-05-15 19:00">May 15</time>
34+
by Staff.
35+
</p>
36+
</footer>
37+
</article>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"fragment": true
3+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## Jurassic Park
2+
3+
Dinos were great!
4+
5+
Way too scary for me.
6+
7+
Posted on May 16 by Lisa.
8+
9+
I agree, dinos are my favorite.
10+
11+
Posted on May 17 by Tom.
12+
13+
Posted on May 15 by Staff.

test/fixtures/aside/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<article>
2+
<p>
3+
The Disney movie <em>The Little Mermaid</em> was
4+
first released to theatres in 1989.
5+
</p>
6+
<aside>
7+
<p>
8+
The movie earned $87 million during its initial release.
9+
</p>
10+
</aside>
11+
<p>
12+
More info about the movie...
13+
</p>
14+
</article>

test/fixtures/aside/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+
}

test/fixtures/aside/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
The Disney movie _The Little Mermaid_ was first released to theatres in 1989.
2+
3+
The movie earned $87 million during its initial release.
4+
5+
More info about the movie...

test/fixtures/body-html/index.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<html>
2+
<head>
3+
<title>Document title</title>
4+
</head>
5+
<body>
6+
<p>This is a paragraph.</p>
7+
</body>
8+
</html>

test/fixtures/body-html/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This is a paragraph.

test/fixtures/hgroup/index.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!doctype html>
2+
<title>HTML Standard</title>
3+
<body>
4+
<hgroup id="document-title">
5+
<h1>HTML</h1>
6+
<h2>Living Standard — Last Updated 12 August 2016</h2>
7+
</hgroup>
8+
<p>Some intro to the document.</p>
9+
<h2>First section</h2>
10+
<p>Some intro to the first section.</p>
11+
</body>

0 commit comments

Comments
 (0)