Skip to content

Commit 9a8108e

Browse files
committed
use low case
1 parent 7f45b0f commit 9a8108e

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/transform/plugins/changelog/collect.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import imsize from '../imsize';
66
import {MarkdownItPluginOpts} from '../typings';
77

88
const BLOCK_START = '{% changelog %}';
9-
const BLOCK_END = '{% endChangelog %}\n';
9+
const BLOCK_END = '{% endchangelog %}\n';
1010

1111
function parseChangelogs(str: string, path?: string) {
1212
const {parse, compile, env} = initMarkdownit({

src/transform/plugins/changelog/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ interface Options {
1414
}
1515

1616
const CHANGELOG_OPEN_RE = /^\{% changelog %}/;
17-
const CHANGELOG_CLOSE_RE = /^\{% endChangelog %}/;
17+
const CHANGELOG_CLOSE_RE = /^\{% endchangelog %}/;
1818

1919
function isOpenToken(tokens: Token[], i: number) {
2020
return (

test/changelog.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ describe('Changelog', () => {
1717
result: {html, changelogs: logs},
1818
} = transform(data, {
1919
plugins: [changelogPlugin, imsize],
20-
enableChangelogs: false,
2120
});
2221

2322
expect(html).toBe(`<h1>Some changelog</h1>\n<p>After changelog</p>\n`);
@@ -64,6 +63,7 @@ describe('Changelog', () => {
6463
path: '',
6564
changelogs,
6665
log: console as unknown as Logger,
66+
extractChangelogs: true,
6767
});
6868

6969
expect(html).toBe(`# Some changelog

test/data/changelog.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ storyId: 123321
1010

1111
Change log payload
1212

13-
{% endChangelog %}
13+
{% endchangelog %}
1414

1515
{% changelog %}
1616
```
@@ -22,7 +22,7 @@ storyId: 123321
2222

2323
Change log payload
2424

25-
{% endChangelog %}
25+
{% endchangelog %}
2626

2727

2828
{% changelog %}
@@ -35,6 +35,6 @@ storyId: 123321
3535

3636
Change log payload
3737

38-
{% endChangelog %}
38+
{% endchangelog %}
3939

4040
After changelog

0 commit comments

Comments
 (0)