Skip to content

Commit b7618b6

Browse files
authored
Merge pull request #15 from AegisJSProject/release/0.1.1
Update to `@aegisjsproject/core@0.1.2`
2 parents 6acd4d3 + ca72668 commit b7618b6

File tree

6 files changed

+34
-28
lines changed

6 files changed

+34
-28
lines changed

CHANGELOG.md

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

77
## [Unreleased]
88

9+
## [v0.1.1] - 2024-03-03
10+
11+
### Changed
12+
- Update to `@aegisjsproject/core@0.1.2`
13+
914
## [v0.1.0] - 2024-02-28
1015

1116
### Added

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ Markdown parser for [`@aegisjsproject/core`](https://github.com/AegisJSProject/c
99
[![GitHub license](https://img.shields.io/github/license/AegisJSProject/markdown.svg)](https://github.com/AegisJSProject/markdown/blob/master/LICENSE)
1010
[![GitHub last commit](https://img.shields.io/github/last-commit/AegisJSProject/markdown.svg)](https://github.com/AegisJSProject/markdown/commits/master)
1111
[![GitHub release](https://img.shields.io/github/release/AegisJSProject/markdown?logo=github)](https://github.com/AegisJSProject/markdown/releases)
12-
[![GitHub Sponsors](https://img.shields.io/github/sponsors/shgysk8zer0?logo=github)](https://github.com/sponsors/shgysk8zer0)
12+
[![GitHub Sponsors](https://img.shields.io/github/sponsors/AegisJSProject?logo=github)](https://github.com/sponsors/shgysk8zer0)
1313

1414
[![npm](https://img.shields.io/npm/v/@aegisjsproject/markdown)](https://www.npmjs.com/package/@aegisjsproject/markdown)
1515
![node-current](https://img.shields.io/node/v/@aegisjsproject/markdown)
16-
![NPM Unpacked Size](https://img.shields.io/npm/unpacked-size/%40shgysk8zer0%2Fmarkdown)
16+
![NPM Unpacked Size](https://img.shields.io/npm/unpacked-size/%40aegisjsproject%2Fmarkdown)
1717

1818
[![npm](https://img.shields.io/npm/dw/@aegisjsproject/markdown?logo=npm)](https://www.npmjs.com/package/@aegisjsproject/markdown)
1919

@@ -42,7 +42,7 @@ document.head.append(
4242
document.getElementById('header').append(md`
4343
# Hello, World!
4444
45-
## It is currently ${new Date().toLocaleString()}.
45+
## It is currently ${new Date()}.
4646
`);
4747

4848
customElements.define('md-preview', class HTMLMDPreviewElement extends HTMLElement {

markdown.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { Marked } from 'marked';
22
import { markedHighlight } from 'marked-highlight';
33
import hljs from 'highlight.js';
4-
import { sanitizeString } from '@aegisjsproject/core/core.js';
4+
import { sanitizeString } from '@aegisjsproject/core/parsers/html.js';
5+
import { stringify } from '@aegisjsproject/core/stringify.js';
56

67
export const hljsURL = new URL(`https://unpkg.com/@highlightjs/cdn-assets@${hljs.versionString}/`);
78

@@ -43,8 +44,8 @@ export function createMDParser({
4344
})
4445
);
4546

46-
return (...args) => {
47-
const parsed = marked.parse(String.raw.apply(null, args), { gfm, breaks, silent });
47+
return (strings, ...args) => {
48+
const parsed = marked.parse(String.raw(strings, ...args.map(stringify)), { gfm, breaks, silent });
4849

4950
return sanitizeString(parsed, {
5051
allowElements, allowAttributes, allowCustomElements, allowUnknownMarkup,

package-lock.json

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aegisjsproject/markdown",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "Markdown parser for `@aegisjsproject/core`",
55
"keywords": [
66
"aegis",
@@ -85,13 +85,13 @@
8585
},
8686
"homepage": "https://github.com/AegisJSProject/markdown#readme",
8787
"devDependencies": {
88-
"@aegisjsproject/styles": "^0.1.0",
88+
"@aegisjsproject/styles": "^0.1.1",
8989
"eslint": "^8.56.0",
9090
"http-server": "^14.1.1",
9191
"rollup": "^4.9.6"
9292
},
9393
"dependencies": {
94-
"@aegisjsproject/core": "^0.1.0",
94+
"@aegisjsproject/core": "^0.1.2",
9595
"@highlightjs/cdn-assets": "^11.9.0",
9696
"marked": "^12.0.0",
9797
"marked-highlight": "^2.1.0"

test/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ document.head.append(
88
document.getElementById('header').append(md`
99
# Hello, World!
1010
11-
## It is currently ${new Date().toLocaleString()}.
11+
## It is currently ${new Date()}.
1212
`);
1313

1414
customElements.define('md-preview', class HTMLMDPreviewElement extends HTMLElement {

0 commit comments

Comments
 (0)