Skip to content

Commit d2b3dc2

Browse files
committed
Add support for <listing>, <plaintext> to code
1 parent 0bc95f3 commit d2b3dc2

File tree

7 files changed

+48
-1
lines changed

7 files changed

+48
-1
lines changed

lib/handlers/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ exports.br = require('./break');
9393

9494
exports.p = exports.summary = require('./paragraph');
9595
exports.hr = require('./thematic-break');
96-
exports.xmp = exports.pre = require('./code');
96+
exports.pre = exports.listing = exports.plaintext = exports.xmp = require('./code');
9797
exports.blockquote = require('./blockquote');
9898

9999
exports.h1 =

test/fixtures/listing/index.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<listing>alpha();</listing>
2+
<listing><code>bravo();</code></listing>
3+
<listing>charlie <code>delta();</code> echo</listing>
4+
<listing>foxtrot <code>golf();</code></listing>
5+
<listing><code>hotel();</code> india</listing>
6+
<listing><code></code></listing>
7+
<listing>juliett <div><code>kilo();</code></div> lima</listing>

test/fixtures/listing/index.json

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

test/fixtures/listing/index.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
```
2+
alpha();
3+
```
4+
5+
```
6+
bravo();
7+
```
8+
9+
10+
```
11+
charlie delta(); echo
12+
```
13+
14+
```
15+
foxtrot golf();
16+
```
17+
18+
```
19+
hotel(); india
20+
```
21+
22+
```
23+
24+
```
25+
26+
```
27+
juliettkilo();lima
28+
```

test/fixtures/plaintext/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<plaintext>and the rest is just <code>plaintext</code>

test/fixtures/plaintext/index.json

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

test/fixtures/plaintext/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```
2+
and the rest is just <code>plaintext</code>
3+
```

0 commit comments

Comments
 (0)