Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
abvthecity committed Oct 30, 2024
1 parent 768faae commit 73c4710
Showing 67 changed files with 10,487 additions and 3,907 deletions.
7 changes: 5 additions & 2 deletions packages/ui/fern-docs-mdx/src/headings.ts
Original file line number Diff line number Diff line change
@@ -43,9 +43,12 @@ export function collectRootHeadings(tree: Root, lines: readonly string[]): Headi

// `toString` will strip away all markdown formatting for the title
// TODO: we should preserve some formatting within the heading, i.e. `<code>` and `<u>`, etc.
const title = mdastToString(heading, { preserveNewlines: false });
const rawTitle = mdastToString(heading, { preserveNewlines: false });

let id = extractAnchorFromHeadingText(title).anchor;
const extractedTitle = extractAnchorFromHeadingText(rawTitle);
const title = extractedTitle.text;

let id = extractedTitle.anchor;

if (id == null) {
id = slugger.slug(title);
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ export function mdastToString(
value?: unknown,
{ includeImageAlt = true, includeHtml = true, preserveNewlines = true }: Options = {},
): string {
return one(value, includeImageAlt, includeHtml, preserveNewlines);
return one(value, includeImageAlt, includeHtml, preserveNewlines).trim();
}

/**
22 changes: 12 additions & 10 deletions packages/ui/fern-docs-search-server/package.json
Original file line number Diff line number Diff line change
@@ -13,19 +13,21 @@
"type": "module",
"exports": {
"./types": {
"types": "./dist/algolia/types.d.ts",
"types": "./src/algolia/types.ts",
"default": "./dist/algolia/types.js"
},
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
"./algolia": {
"types": "./src/algolia/index.ts",
"default": "./dist/algolia/index.js"
},
"./tasks": {
"types": "./src/tasks/index.ts",
"default": "./dist/tasks/index.js"
}
},
"sideEffects": false,
"scripts": {
"clean": "rm -rf ./lib && tsc --build --clean",
"trigger:dev": "pnpm dlx trigger.dev@latest dev",
"compile": "tsc --build",
"compile": "tsup --clean",
"test": "vitest --run --passWithNoTests --globals",
"lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../../.eslintignore",
"lint:eslint:fix": "pnpm lint:eslint --fix",
@@ -35,29 +37,29 @@
"format:check": "prettier --check --ignore-unknown --ignore-path ../../../shared/.prettierignore \"**\"",
"organize-imports": "organize-imports-cli tsconfig.json",
"depcheck": "depcheck",
"dev": "tsc --watch",
"dev": "tsup --watch",
"docs:dev": "pnpm dev"
},
"dependencies": {
"@fern-api/fdr-sdk": "workspace:*",
"@fern-api/ui-core-utils": "workspace:*",
"@fern-ui/fern-docs-mdx": "workspace:*",
"@fern-ui/fern-docs-utils": "workspace:*",
"@trigger.dev/sdk": "^3.0.13",
"algoliasearch": "^5.10.2",
"es-toolkit": "^1.24.0",
"pnpm": "^9.12.1",
"ts-essentials": "^10.0.1",
"zod": "^3.23.8"
},
"devDependencies": {
"@fern-platform/configs": "workspace:*",
"@trigger.dev/build": "^3.0.13",
"@types/node": "^18.7.18",
"depcheck": "^1.4.3",
"eslint": "^8.56.0",
"organize-imports-cli": "^0.10.0",
"prettier": "^3.3.2",
"stylelint": "^16.1.0",
"tsup": "^8.0.2",
"typescript": "5.4.3",
"vitest": "^1.5.0"
}

Large diffs are not rendered by default.

4,232 changes: 1,681 additions & 2,551 deletions packages/ui/fern-docs-search-server/src/algolia/__test__/__snapshots__/humanloop.json

Large diffs are not rendered by default.

Loading

0 comments on commit 73c4710

Please sign in to comment.