madr-lint 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +9 -1
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +12 -2
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`f854ca3`](https://github.com/knktkc/madr-lint/commit/f854ca3a84e2694307356117bfd23c9d5db3ef2c) Thanks [@knktkc](https://github.com/knktkc)! - Reject JavaScript frontmatter instead of evaluating it. A document that opens with `---js` or `---javascript` now fails with an error, and its frontmatter block is not executed.
|
|
8
|
+
|
|
3
9
|
## 0.4.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
export {
|
|
2
|
+
export { };
|
package/dist/cli.js
CHANGED
|
@@ -137,7 +137,15 @@ function nullProtoMap() {
|
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
// src/core/parser.ts
|
|
140
|
-
var GRAY_MATTER_OPTIONS = Object.freeze({
|
|
140
|
+
var GRAY_MATTER_OPTIONS = Object.freeze({
|
|
141
|
+
engines: {
|
|
142
|
+
javascript: () => {
|
|
143
|
+
throw new Error(
|
|
144
|
+
"JavaScript frontmatter (---js) is not supported. Use YAML frontmatter."
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
});
|
|
141
149
|
function frontmatterOffset(content) {
|
|
142
150
|
return content.length - grayMatter(content, GRAY_MATTER_OPTIONS).content.length;
|
|
143
151
|
}
|