redput 4.9.1 β†’ 4.9.2

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 CHANGED
@@ -1,3 +1,8 @@
1
+ 2026.09.27, v4.9.2
2
+
3
+ fix:
4
+ - 37d33c9 redput: write: nested: write-readme: insert-rule-section: escape
5
+
1
6
  2026.09.27, v4.9.1
2
7
 
3
8
  fix:
@@ -6,6 +6,11 @@ const {
6
6
  remove,
7
7
  } = operator;
8
8
 
9
+ const createCodeblock = (source) => {
10
+ const escaped = source.replaceAll('`', '\\`');
11
+ return template.ast(`codeblock('js', \`${escaped}\`)`);
12
+ };
13
+
9
14
  export const report = ({name}) => `Insert '${name}' to 'README.md'`;
10
15
 
11
16
  export const fix = ({name, link, license, correct, incorrect}) => {
@@ -14,9 +19,9 @@ export const fix = ({name, link, license, correct, incorrect}) => {
14
19
  const heading = template.ast(`heading(2, '${name}')`);
15
20
  const paragraph = template.ast(`paragraph('Checkout in 🐊', link(bold('Putout Editor'), '${link}'), '.')`);
16
21
  const headingIncorrect = template.ast(`heading(3, '❌ Example of incorrect code')`);
17
- const codeIncorrect = template.ast(`codeblock('js', \`${incorrect}\`)`);
22
+ const codeIncorrect = createCodeblock(incorrect);
18
23
  const headingCorrect = template.ast(`heading(3, 'βœ… Example of correct code')`);
19
- const codeCorrect = template.ast(`codeblock('js', \`${correct}\`)`);
24
+ const codeCorrect = createCodeblock(correct);
20
25
 
21
26
  const licenseType = license.getNextSibling();
22
27
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redput",
3
- "version": "4.9.1",
3
+ "version": "4.9.2",
4
4
  "description": "CLI tool to convert source from 🐊Putout Editor to files",
5
5
  "main": "lib/redput.js",
6
6
  "bin": {