Skip to content

Build your personal knowledge base with Trilium Notes

style(text): shorten the tabs comments and sort a spec's imports

Elian Doran8d74212007bb
diff --git a/apps/client/src/widgets/find_in_html.spec.ts b/apps/client/src/widgets/find_in_html.spec.ts
index 6e7d1f1f25..01fc4425cd 100644
--- a/apps/client/src/widgets/find_in_html.spec.ts
+++ b/apps/client/src/widgets/find_in_html.spec.ts
@@ -1,6 +1,5 @@
-import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
-
import { applyTabs } from "@triliumnext/ckeditor5/src/plugins/tabs/tabs_read_only.js";
+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import FindInHtml from "./find_in_html.js";
diff --git a/apps/client/src/widgets/type_widgets/markdown/Markdown.tsx b/apps/client/src/widgets/type_widgets/markdown/Markdown.tsx
index 61290aea01..cfc5d72272 100644
--- a/apps/client/src/widgets/type_widgets/markdown/Markdown.tsx
+++ b/apps/client/src/widgets/type_widgets/markdown/Markdown.tsx
@@ -712,10 +712,8 @@ export function renderWithSourceLines(src: string): { html: string; headings: Ma
}
/**
- * The 1-indexed line of every tab header, in document order, which is also the order of the
- * rendered `section.trilium-tab` elements. A tab panel is dedented, which keeps its line count, so
- * the lines of nested tabs follow from their parent tab. Inside a list or a block quote the lines
- * are approximate.
+ * Returns the 1-indexed line of every tab header, in the order of the rendered
+ * `section.trilium-tab` elements; inside a list or a block quote the lines are approximate.
*/
function collectTabLines(tokens: Token[], firstLine: number): number[] {
const lines: number[] = [];
diff --git a/packages/trilium-core/src/services/export/markdown.ts b/packages/trilium-core/src/services/export/markdown.ts
index c5801a4f3e..84cfe18a92 100644
--- a/packages/trilium-core/src/services/export/markdown.ts
+++ b/packages/trilium-core/src/services/export/markdown.ts
@@ -426,12 +426,7 @@ function buildDetailsFilter(): Rule {
};
}
-/**
- * Tabs blocks export to the tabbed syntax of Python-Markdown's `pymdownx.tabbed` (used by Material
- * for MkDocs): a `=== "Title"` line per tab, followed by the panel indented four spaces. A block
- * that directly follows another one starts with `===! "Title"`, which keeps the two apart. The
- * shared Markdown renderer reads the same syntax back.
- */
+/** Exports a tab title as the `=== "Title"` line of MkDocs content tabs (`pymdownx.tabbed`). */
function buildTabTitleFilter(): Rule {
return {
filter(node) {