Skip to content

Commit c2e039f

Browse files
authored
Merge pull request #13 from shgysk8zer0/release/0.0.3
Update with full ESM compatibility & tests
2 parents 4c3e071 + e248443 commit c2e039f

File tree

7 files changed

+1019
-22
lines changed

7 files changed

+1019
-22
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [v0.0.3] - 2024-02-26
10+
11+
### Added
12+
- Add `http-server` as dev dependency + `test/` page
13+
14+
### Changed
15+
- Use `@highlightjs/cdn-assets` instead of `hightlight.js`
16+
- Directly use `String.raw` to parse text
17+
- Misc updates to dependencies
18+
19+
### Fixed
20+
- Fix incorrect badges in `README.md`
21+
922
## [v0.0.2] - 2024-02-08
1023

1124
### Changed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Markdown parser for [`@shgysk8zer0/aegis`](https://github.com/shgysk8zer0/aegis)
44

5-
[![CodeQL](https://github.com/shgysk8zer0/aegis-markdown/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/shgysk8zer0/npm-template/actions/workflows/codeql-analysis.yml)
5+
[![CodeQL](https://github.com/shgysk8zer0/aegis-markdown/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/shgysk8zer0/aegis-markdown/actions/workflows/codeql-analysis.yml)
66
![Node CI](https://github.com/shgysk8zer0/aegis-markdown/workflows/Node%20CI/badge.svg)
77
![Lint Code Base](https://github.com/shgysk8zer0/aegis-markdown/workflows/Lint%20Code%20Base/badge.svg)
88

@@ -11,10 +11,11 @@ Markdown parser for [`@shgysk8zer0/aegis`](https://github.com/shgysk8zer0/aegis)
1111
[![GitHub release](https://img.shields.io/github/release/shgysk8zer0/aegis-markdown?logo=github)](https://github.com/shgysk8zer0/aegis-markdown/releases)
1212
[![GitHub Sponsors](https://img.shields.io/github/sponsors/shgysk8zer0?logo=github)](https://github.com/sponsors/shgysk8zer0)
1313

14-
[![npm](https://img.shields.io/npm/v/@shgysk8zer0/npm-template)](https://www.npmjs.com/package/@shgysk8zer0/npm-template)
15-
![node-current](https://img.shields.io/node/v/@shgysk8zer0/npm-template)
16-
![npm bundle size gzipped](https://img.shields.io/bundlephobia/minzip/@shgysk8zer0/npm-template)
17-
[![npm](https://img.shields.io/npm/dw/@shgysk8zer0/npm-template?logo=npm)](https://www.npmjs.com/package/@shgysk8zer0/npm-template)
14+
[![npm](https://img.shields.io/npm/v/@shgysk8zer0/aegis-markdown)](https://www.npmjs.com/package/@shgysk8zer0/aegis-markdown)
15+
![node-current](https://img.shields.io/node/v/@shgysk8zer0/aegis-markdown)
16+
![NPM Unpacked Size](https://img.shields.io/npm/unpacked-size/%40shgysk8zer0%2Faegis-markdown)
17+
18+
[![npm](https://img.shields.io/npm/dw/@shgysk8zer0/aegis-markdown?logo=npm)](https://www.npmjs.com/package/@shgysk8zer0/aegis-markdown)
1819

1920
[![GitHub followers](https://img.shields.io/github/followers/shgysk8zer0.svg?style=social)](https://github.com/shgysk8zer0)
2021
![GitHub forks](https://img.shields.io/github/forks/shgysk8zer0/aegis-markdown.svg?style=social)

markdown.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Marked } from 'marked';
22
import { markedHighlight } from 'marked-highlight';
33
import hljs from 'highlight.js';
4-
import { text, sanitizeString } from '@shgysk8zer0/aegis';
4+
import { sanitizeString } from '@shgysk8zer0/aegis';
55

66
export function createMDParser({
77
gfm = true,
@@ -25,8 +25,8 @@ export function createMDParser({
2525
})
2626
);
2727

28-
return (strings, ...args) => {
29-
const parsed = marked.parse(text(strings, ...args), { gfm, breaks, silent });
28+
return (...args) => {
29+
const parsed = marked.parse(String.raw.apply(null, args), { gfm, breaks, silent });
3030

3131
return sanitizeString(parsed, {
3232
allowElements, allowAttributes, allowCustomElements, allowUnknownMarkup,

0 commit comments

Comments
 (0)