@promptbook/markdown-utils 0.81.0-16 → 0.81.0-17

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/esm/index.es.js CHANGED
@@ -22,7 +22,7 @@ var BOOK_LANGUAGE_VERSION = '1.0.0';
22
22
  * @generated
23
23
  * @see https://github.com/webgptorg/promptbook
24
24
  */
25
- var PROMPTBOOK_ENGINE_VERSION = '0.81.0-15';
25
+ var PROMPTBOOK_ENGINE_VERSION = '0.81.0-16';
26
26
  /**
27
27
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
28
28
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -967,7 +967,6 @@ function checkSerializableAsJson(options) {
967
967
  function deepClone(objectValue) {
968
968
  return JSON.parse(JSON.stringify(objectValue));
969
969
  /*
970
- !!!!!!!!
971
970
  TODO: [🧠] Is there a better implementation?
972
971
  > const propertyNames = Object.getOwnPropertyNames(objectValue);
973
972
  > for (const propertyName of propertyNames) {
@@ -6136,13 +6135,13 @@ var _MarkdownScraperRegistration = $scrapersRegister.register(createMarkdownScra
6136
6135
  */
6137
6136
 
6138
6137
  /**
6139
- * Removes HTML or Markdown comments from a string.
6138
+ * Removes Markdown (or HTML) comments
6140
6139
  *
6141
6140
  * @param {string} content - The string to remove comments from.
6142
6141
  * @returns {string} The input string with all comments removed.
6143
6142
  * @public exported from `@promptbook/markdown-utils`
6144
6143
  */
6145
- function removeContentComments(content) {
6144
+ function removeMarkdownComments(content) {
6146
6145
  return spaceTrim$1(content.replace(/<!--(.*?)-->/gs, ''));
6147
6146
  }
6148
6147
 
@@ -6161,7 +6160,7 @@ function addAutoGeneratedSection(content, options) {
6161
6160
  return content.replace(sectionRegex, contentToInsert);
6162
6161
  }
6163
6162
  // Note: Following is the case when the section is not found in the file so we add it there
6164
- var placeForSection = removeContentComments(content).match(/^##.*$/im);
6163
+ var placeForSection = removeMarkdownComments(content).match(/^##.*$/im);
6165
6164
  if (placeForSection !== null) {
6166
6165
  var _a = __read(placeForSection, 1), heading_1 = _a[0];
6167
6166
  return content.replace(heading_1, spaceTrim$1(function (block) { return "\n ".concat(block(contentToInsert), "\n\n ").concat(block(heading_1), "\n "); }));
@@ -6459,5 +6458,5 @@ function removeMarkdownFormatting(str) {
6459
6458
  return str;
6460
6459
  }
6461
6460
 
6462
- export { BOOK_LANGUAGE_VERSION, MarkdownScraper, PROMPTBOOK_ENGINE_VERSION, _MarkdownScraperRegistration, addAutoGeneratedSection, createMarkdownChart, createMarkdownScraper, createMarkdownTable, escapeMarkdownBlock, extractAllBlocksFromMarkdown, extractAllListItemsFromMarkdown, extractBlock, extractJsonBlock, extractOneBlockFromMarkdown, flattenMarkdown, parseMarkdownSection, removeContentComments, removeMarkdownFormatting, splitMarkdownIntoSections };
6461
+ export { BOOK_LANGUAGE_VERSION, MarkdownScraper, PROMPTBOOK_ENGINE_VERSION, _MarkdownScraperRegistration, addAutoGeneratedSection, createMarkdownChart, createMarkdownScraper, createMarkdownTable, escapeMarkdownBlock, extractAllBlocksFromMarkdown, extractAllListItemsFromMarkdown, extractBlock, extractJsonBlock, extractOneBlockFromMarkdown, flattenMarkdown, parseMarkdownSection, removeMarkdownComments, removeMarkdownFormatting, splitMarkdownIntoSections };
6463
6462
  //# sourceMappingURL=index.es.js.map