Skip to content

Commit 9919aa9

Browse files
committed
Merge branch 'release/v1.5.3'
2 parents a5b9bb3 + 7754f70 commit 9919aa9

File tree

8 files changed

+5477
-1744
lines changed

8 files changed

+5477
-1744
lines changed

.eslintrc.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module.exports = {
1313
env: {
1414
browser: true,
1515
es2021: true,
16-
// 'jest/globals': true,
16+
'jest/globals': true,
1717
},
1818
globals: {
1919
// React: true,
@@ -25,7 +25,7 @@ module.exports = {
2525
'react-hooks',
2626
// 'jsx-a11y',
2727
'@typescript-eslint',
28-
// 'jest',
28+
'jest',
2929
'functional',
3030
// 'fp',
3131
// 'better-mutation',
@@ -37,7 +37,7 @@ module.exports = {
3737
'plugin:react/recommended',
3838
// 'plugin:jsx-a11y/recommended',
3939
// 'plugin:import/recommended',
40-
// 'plugin:jest/recommended',
40+
'plugin:jest/recommended',
4141
// 'plugin:functional/external-recommended',
4242
// 'plugin:functional/recommended',
4343
// 'plugin:functional/stylistic',

__tests__/index.ts

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { cleanLabel } from '../src/utils/index';
2+
3+
4+
describe('cleanLabel', () => {
5+
it('should remove properties', () => {
6+
const content = `## asdf
7+
id:: 643135d6-33b2-4aea-a78c-e6b3e0ce0f80
8+
test-asdf:: 12 12`;
9+
const result = cleanLabel(content);
10+
expect(result).toEqual('## asdf');
11+
});
12+
13+
it('should remove todo items', () => {
14+
const content = 'TODO buy milk';
15+
const result = cleanLabel(content);
16+
expect(result).toEqual('buy milk');
17+
});
18+
19+
it('should image dimensions', () => {
20+
const content = '![](./asdf.png) {:width 400}';
21+
const result = cleanLabel(content);
22+
expect(result).toEqual('![](./asdf.png)');
23+
});
24+
});

changelog.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 1.5.3
4+
### Fixed
5+
- Improved regular expressions for label rendering (to filter out keywords, properties, etc.)
6+
37
## 1.5.2
48
### Fixed
59
- Fixed bug where expanding collapsed blocks wasn't working properly

jest.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/** @type {import('ts-jest').JestConfigWithTsJest} */
2+
module.exports = {
3+
preset: 'ts-jest',
4+
testEnvironment: 'node',
5+
};

0 commit comments

Comments
 (0)