@mastra/rag 2.2.0-alpha.0 → 2.2.1-alpha.0

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/dist/index.js CHANGED
@@ -6103,7 +6103,7 @@ var SemanticMarkdownTransformer = class _SemanticMarkdownTransformer extends Tex
6103
6103
  let currentTitle = "";
6104
6104
  let currentDepth = 0;
6105
6105
  let inCodeBlock = false;
6106
- const headerRegex = /^(#+)\s+(.+)$/;
6106
+ const headerRegex = /^(#{1,6})[ \t]+(\S[^\n]{0,1024})$/;
6107
6107
  for (let i = 0; i < lines.length; i++) {
6108
6108
  const line = lines[i];
6109
6109
  const headerMatch = line.match(headerRegex);