@blaaiz/docs-core 0.7.2 → 0.7.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.
@@ -2190,12 +2190,20 @@ function isGeneratedApiPage(frontmatter) {
2190
2190
  return /^_openapi\s*:/m.test(frontmatter);
2191
2191
  }
2192
2192
  function cleanBody(body) {
2193
- const segments = body.split(/(```[\s\S]*?```)/g);
2193
+ const segments = body.split(/(```[\s\S]*?```|`[^`\n]+`)/g);
2194
2194
  const cleaned = segments.map(
2195
- (segment) => segment.startsWith("```") ? segment : segment.replace(/^\s*(import|export)\s.*$/gm, "").replace(/\{\/\*[\s\S]*?\*\/\}/g, "").replace(/<\/?[A-Za-z][^>]*>/g, "")
2195
+ (segment) => segment.startsWith("`") ? segment : segment.replace(/^\s*(import|export)\s.*$/gm, "").replace(/\{\/\*[\s\S]*?\*\/\}/g, "").replace(/<[A-Za-z][^>]*>/g, keepTagTitle).replace(/<\/[A-Za-z][^>]*>/g, "")
2196
2196
  );
2197
2197
  return cleaned.join("").replace(/\n{3,}/g, "\n\n").trim();
2198
2198
  }
2199
+ function keepTagTitle(tag) {
2200
+ const title = /\btitle="([^"]*)"/.exec(tag)?.[1];
2201
+ if (title === void 0 || title === "") {
2202
+ return "";
2203
+ }
2204
+ const href = /\bhref="([^"]*)"/.exec(tag)?.[1];
2205
+ return href === void 0 ? `**${title}**` : `[${title}](${href})`;
2206
+ }
2199
2207
  function summariseApiPage(title, description, body, documents) {
2200
2208
  const opMatch = /operations=\{(\[[\s\S]*?\])\}/.exec(body);
2201
2209
  let ops = [];
@@ -3324,5 +3332,5 @@ function mergeOpenApiDocuments(inputs, options) {
3324
3332
  }
3325
3333
 
3326
3334
  export { AI_PROVIDER_MODELS, AI_PROVIDER_NAMES, AiConfigError, DocsConfigError, InvalidNavigationError, OpenApiMergeError, ProxyTargetError, SESSION_COOKIE, assertAllowedTarget, buildLlmsTxt, buildMetadata, buildRobots, buildSearchIndex, buildSessionCookie, buildSitemap, buildThemeCss, clearSessionCookie, createAskAiRoute, createAuthGate, createEmailSignIn, createGoogleAuth, createMarkdownRoute, createSecretSignIn, createSignOut, createSiteAuth, createTryItProxy, createTryItProxyRoute, curlCodeUsage, defineDocsConfig, hasOpenApi, isAllowedEmail, isMarkdownRouteRequest, markdownRewriteTarget, mdxToMarkdown, mergeOpenApiDocuments, openApiOperationToMarkdown, parseNavigation, planDocsTree, readCookie, redirectTarget, resolveAiConfig, searchIndex, signSession, unwrapProxyTarget, validateDocsConfig, verifySession };
3327
- //# sourceMappingURL=chunk-II3RGD6Q.js.map
3328
- //# sourceMappingURL=chunk-II3RGD6Q.js.map
3335
+ //# sourceMappingURL=chunk-KIE7J526.js.map
3336
+ //# sourceMappingURL=chunk-KIE7J526.js.map