mirror of
https://github.com/alrayyes/wiki.git
synced 2025-05-02 06:58:13 +00:00
format
This commit is contained in:
parent
0c199975f2
commit
58d9dc0528
5 changed files with 19 additions and 8 deletions
quartz/util
|
@ -198,7 +198,15 @@ describe("transforms", () => {
|
|||
})
|
||||
|
||||
describe("link strategies", () => {
|
||||
const allSlugs = ["a/b/c", "a/b/d", "a/b/index", "e/f", "e/g/h", "index", "a/test.png"] as ServerSlug[]
|
||||
const allSlugs = [
|
||||
"a/b/c",
|
||||
"a/b/d",
|
||||
"a/b/index",
|
||||
"e/f",
|
||||
"e/g/h",
|
||||
"index",
|
||||
"a/test.png",
|
||||
] as ServerSlug[]
|
||||
|
||||
describe("absolute", () => {
|
||||
const opts: TransformOptions = {
|
||||
|
@ -285,7 +293,10 @@ describe("link strategies", () => {
|
|||
assert.strictEqual(path.transformLink(cur, "../../../index.png", opts), "../../../index.png")
|
||||
assert.strictEqual(path.transformLink(cur, "../../../index#abc", opts), "../../../#abc")
|
||||
assert.strictEqual(path.transformLink(cur, "../../../", opts), "../../../")
|
||||
assert.strictEqual(path.transformLink(cur, "../../../a/test.png", opts), "../../../a/test.png")
|
||||
assert.strictEqual(
|
||||
path.transformLink(cur, "../../../a/test.png", opts),
|
||||
"../../../a/test.png",
|
||||
)
|
||||
assert.strictEqual(path.transformLink(cur, "../../../e/g/h", opts), "../../../e/g/h")
|
||||
assert.strictEqual(path.transformLink(cur, "../../../e/g/h", opts), "../../../e/g/h")
|
||||
assert.strictEqual(path.transformLink(cur, "../../../e/g/h#abc", opts), "../../../e/g/h#abc")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue