fmt
This commit is contained in:
@@ -27,7 +27,10 @@ test("description is the snippet's first line plus the page", () => {
|
||||
});
|
||||
|
||||
test("description uses only the first line of a multi-line snippet", () => {
|
||||
const multi = { ...base, snippet: "- Item $ii\n - child one\n - child two" };
|
||||
const multi = {
|
||||
...base,
|
||||
snippet: "- Item $ii\n - child one\n - child two",
|
||||
};
|
||||
expect(anchorDescription(multi)).toBe("- Item $ii — Finances");
|
||||
});
|
||||
|
||||
|
||||
@@ -17,10 +17,7 @@ import {
|
||||
type Ref,
|
||||
} from "@silverbulletmd/silverbullet/lib/ref";
|
||||
import { folderName } from "@silverbulletmd/silverbullet/lib/resolve";
|
||||
import {
|
||||
type AnchorObject,
|
||||
anchorsToFilterOptions,
|
||||
} from "./anchor_options.ts";
|
||||
import { type AnchorObject, anchorsToFilterOptions } from "./anchor_options.ts";
|
||||
|
||||
const tagRegex = new RegExp(mdTagRegex.source, "g");
|
||||
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
import { Fragment } from "preact";
|
||||
import {
|
||||
Button,
|
||||
Input,
|
||||
UrlPrefixInput,
|
||||
} from "@silverbulletmd/silverbullet/ui";
|
||||
import { Button, Input, UrlPrefixInput } from "@silverbulletmd/silverbullet/ui";
|
||||
import { FolderPicker } from "../../FolderPicker.tsx";
|
||||
import { FieldErrors } from "../../space_fields.tsx";
|
||||
import type { FieldError } from "../../types.ts";
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import { useState } from "preact/hooks";
|
||||
import { Alert, prefixFromName, slugify } from "@silverbulletmd/silverbullet/ui";
|
||||
import {
|
||||
Alert,
|
||||
prefixFromName,
|
||||
slugify,
|
||||
} from "@silverbulletmd/silverbullet/ui";
|
||||
import type { FieldError } from "./types.ts";
|
||||
|
||||
/**
|
||||
|
||||
@@ -198,8 +198,8 @@ test.describe("Page picker anchor mode with a duplicate anchor name", () => {
|
||||
// error path and never navigate anywhere. Landing on Beta confirms the
|
||||
// picker qualified the ref with the page the clicked row belongs to.
|
||||
await expect(modal).not.toBeVisible();
|
||||
await expect(
|
||||
sbPage.locator("#sb-current-page input.sb-input"),
|
||||
).toHaveValue("Beta");
|
||||
await expect(sbPage.locator("#sb-current-page input.sb-input")).toHaveValue(
|
||||
"Beta",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user