Skip to content

Commit

Permalink
use low case
Browse files Browse the repository at this point in the history
  • Loading branch information
Feverqwe committed May 23, 2023
1 parent 7f45b0f commit 9a8108e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/transform/plugins/changelog/collect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import imsize from '../imsize';
import {MarkdownItPluginOpts} from '../typings';

const BLOCK_START = '{% changelog %}';
const BLOCK_END = '{% endChangelog %}\n';
const BLOCK_END = '{% endchangelog %}\n';

function parseChangelogs(str: string, path?: string) {
const {parse, compile, env} = initMarkdownit({
Expand Down
2 changes: 1 addition & 1 deletion src/transform/plugins/changelog/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface Options {
}

const CHANGELOG_OPEN_RE = /^\{% changelog %}/;
const CHANGELOG_CLOSE_RE = /^\{% endChangelog %}/;
const CHANGELOG_CLOSE_RE = /^\{% endchangelog %}/;

function isOpenToken(tokens: Token[], i: number) {
return (
Expand Down
2 changes: 1 addition & 1 deletion test/changelog.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ describe('Changelog', () => {
result: {html, changelogs: logs},
} = transform(data, {
plugins: [changelogPlugin, imsize],
enableChangelogs: false,
});

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

expect(html).toBe(`# Some changelog
Expand Down
6 changes: 3 additions & 3 deletions test/data/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ storyId: 123321

Change log payload

{% endChangelog %}
{% endchangelog %}

{% changelog %}
```
Expand All @@ -22,7 +22,7 @@ storyId: 123321

Change log payload

{% endChangelog %}
{% endchangelog %}


{% changelog %}
Expand All @@ -35,6 +35,6 @@ storyId: 123321

Change log payload

{% endChangelog %}
{% endchangelog %}

After changelog

0 comments on commit 9a8108e

Please sign in to comment.