@diplodoc/cli 5.35.2 → 5.35.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.
@@ -2067,6 +2067,9 @@
2067
2067
  // src/worker/format.ts
2068
2068
  var MAX_LENGTH = 200;
2069
2069
  var SHORT_HEAD = 20;
2070
+ function escapeHTML(str) {
2071
+ return str.replace(/</g, "&lt;").replace(/>/g, "&gt;");
2072
+ }
2070
2073
  function format({ base, mark }, results, registry2, trim) {
2071
2074
  return results.map((entry) => {
2072
2075
  const doc = registry2[entry.ref];
@@ -2138,10 +2141,10 @@
2138
2141
  }
2139
2142
  }
2140
2143
  function highlighte(mark, text, positions) {
2141
- return positions.reduceRight((result, position) => {
2142
- const [before, content, after] = split(result, position);
2143
- return `${before}<span class="${mark}">${content}</span>${after}`;
2144
- }, text);
2144
+ return positions.reduce((accumulator, [from, to], index2) => {
2145
+ const prevTo = index2 === 0 ? 0 : positions[index2 - 1][1];
2146
+ return accumulator + escapeHTML(text.slice(prevTo, from)) + `<span class="${mark}">${escapeHTML(text.slice(from, to))}</span>`;
2147
+ }, "") + escapeHTML(text.slice(positions.length ? positions[positions.length - 1][1] : 0));
2145
2148
  }
2146
2149
  function split(text, position) {
2147
2150
  const before = text.slice(0, position[0]);
package/build/index.js CHANGED
@@ -348537,7 +348537,7 @@ var import_config81 = require("@diplodoc/cli/lib/config");
348537
348537
 
348538
348538
  // src/constants.ts
348539
348539
  var import_node_path2 = require("node:path");
348540
- var VERSION = "5.35.2" ? "5.35.2" : "0.0.0";
348540
+ var VERSION = "5.35.3" ? "5.35.3" : "0.0.0";
348541
348541
  var MAIN_TIMER_ID = "Build time";
348542
348542
  var ASSETS_FOLDER = (0, import_node_path2.resolve)(__dirname, "../assets");
348543
348543
  var BUNDLE_FOLDER = "_bundle";
@@ -395608,8 +395608,8 @@ var run2 = async (argv2) => {
395608
395608
  if (import_node_worker_threads4.isMainThread && require.main === module) {
395609
395609
  (async () => {
395610
395610
  import_utils392.console.time(MAIN_TIMER_ID);
395611
- if ("5.35.2") {
395612
- import_utils392.console.log(`Using v${"5.35.2"} version`);
395611
+ if ("5.35.3") {
395612
+ import_utils392.console.log(`Using v${"5.35.3"} version`);
395613
395613
  }
395614
395614
  const report = await run2(process.argv);
395615
395615
  import_utils392.console.timeEnd(MAIN_TIMER_ID);
package/build/index.mjs CHANGED
@@ -348523,7 +348523,7 @@ import { Command as Command8 } from "@diplodoc/cli/lib/config";
348523
348523
 
348524
348524
  // src/constants.ts
348525
348525
  import { join, resolve as resolve2 } from "node:path";
348526
- var VERSION = "5.35.2" ? "5.35.2" : "0.0.0";
348526
+ var VERSION = "5.35.3" ? "5.35.3" : "0.0.0";
348527
348527
  var MAIN_TIMER_ID = "Build time";
348528
348528
  var ASSETS_FOLDER = resolve2(__dirname, "../assets");
348529
348529
  var BUNDLE_FOLDER = "_bundle";
@@ -395627,8 +395627,8 @@ var run2 = async (argv2) => {
395627
395627
  if (isMainThread4 && __require.main === module) {
395628
395628
  (async () => {
395629
395629
  console7.time(MAIN_TIMER_ID);
395630
- if ("5.35.2") {
395631
- console7.log(`Using v${"5.35.2"} version`);
395630
+ if ("5.35.3") {
395631
+ console7.log(`Using v${"5.35.3"} version`);
395632
395632
  }
395633
395633
  const report = await run2(process.argv);
395634
395634
  console7.timeEnd(MAIN_TIMER_ID);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diplodoc/cli",
3
- "version": "5.35.2",
3
+ "version": "5.35.3",
4
4
  "description": "Make documentation using yfm-docs in Markdown and HTML formats",
5
5
  "keywords": [
6
6
  "markdown",
@@ -111,7 +111,7 @@
111
111
  "@diplodoc/mermaid-extension": "^1.3.5",
112
112
  "@diplodoc/openapi-extension": "^5.1.3",
113
113
  "@diplodoc/page-constructor-extension": "^0.13.2",
114
- "@diplodoc/search-extension": "^3.0.2",
114
+ "@diplodoc/search-extension": "^3.0.5",
115
115
  "@diplodoc/tsconfig": "^1.0.2",
116
116
  "@diplodoc/yfmlint": "^1.7.3",
117
117
  "@octokit/core": "4.2.4",