writr 4.5.0 → 4.5.1

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.
Files changed (2) hide show
  1. package/dist/writr.js +20 -4
  2. package/package.json +9 -9
package/dist/writr.js CHANGED
@@ -302,8 +302,16 @@ ${yamlString}---
302
302
  if (content !== void 0) {
303
303
  this._content = content;
304
304
  }
305
- const validationOptions = options ? { ...options, caching: false } : void 0;
306
- await this.render(validationOptions);
305
+ let { engine } = this;
306
+ if (options) {
307
+ options = {
308
+ ...this._options.renderOptions,
309
+ ...options,
310
+ caching: false
311
+ };
312
+ engine = this.createProcessor(options);
313
+ }
314
+ await engine.run(engine.parse(this.body));
307
315
  if (content !== void 0) {
308
316
  this._content = originalContent;
309
317
  }
@@ -327,8 +335,16 @@ ${yamlString}---
327
335
  if (content !== void 0) {
328
336
  this._content = content;
329
337
  }
330
- const validationOptions = options ? { ...options, caching: false } : void 0;
331
- this.renderSync(validationOptions);
338
+ let { engine } = this;
339
+ if (options) {
340
+ options = {
341
+ ...this._options.renderOptions,
342
+ ...options,
343
+ caching: false
344
+ };
345
+ engine = this.createProcessor(options);
346
+ }
347
+ engine.runSync(engine.parse(this.body));
332
348
  if (content !== void 0) {
333
349
  this._content = originalContent;
334
350
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "writr",
3
- "version": "4.5.0",
3
+ "version": "4.5.1",
4
4
  "description": "Markdown Rendering Simplified",
5
5
  "type": "module",
6
6
  "main": "./dist/writr.js",
@@ -55,8 +55,8 @@
55
55
  "website:serve": "rimraf ./site/README.md ./site/dist && npx docula serve -s ./site -o ./site/dist"
56
56
  },
57
57
  "dependencies": {
58
- "cacheable": "^1.10.4",
59
- "hookified": "^1.12.0",
58
+ "cacheable": "^2.0.2",
59
+ "hookified": "^1.12.1",
60
60
  "html-react-parser": "^5.2.6",
61
61
  "js-yaml": "^4.1.0",
62
62
  "react": "^19.1.1",
@@ -64,22 +64,22 @@
64
64
  "rehype-katex": "^7.0.1",
65
65
  "rehype-slug": "^6.0.0",
66
66
  "rehype-stringify": "^10.0.1",
67
- "remark-emoji": "^5.0.1",
67
+ "remark-emoji": "^5.0.2",
68
68
  "remark-gfm": "^4.0.1",
69
69
  "remark-math": "^6.0.0",
70
- "remark-mdx": "^3.1.0",
70
+ "remark-mdx": "^3.1.1",
71
71
  "remark-parse": "^11.0.0",
72
72
  "remark-rehype": "^11.1.2",
73
73
  "remark-toc": "^9.0.0",
74
74
  "unified": "^11.0.5"
75
75
  },
76
76
  "devDependencies": {
77
- "@biomejs/biome": "^2.2.2",
77
+ "@biomejs/biome": "^2.2.4",
78
78
  "@types/js-yaml": "^4.0.9",
79
- "@types/node": "^24.3.0",
80
- "@types/react": "^19.1.11",
79
+ "@types/node": "^24.5.2",
80
+ "@types/react": "^19.1.13",
81
81
  "@vitest/coverage-v8": "^3.2.4",
82
- "docula": "^0.20.0",
82
+ "docula": "^0.30.0",
83
83
  "rimraf": "^6.0.1",
84
84
  "ts-node": "^10.9.2",
85
85
  "tsup": "^8.5.0",