feat(ui): improve readability and fix workspace regressions
Separate interface typography from document text and enlarge controls across the workspace and public reader. Keep tree menus within the viewport and make constrained dialogs scrollable. Preserve nested image references, escape moved link paths, synchronize note creation and daily-note opening, and hydrate shared headings. Add regression coverage for settings and workspace behavior.
This commit is contained in:
1 parent
4d1339851b
commit
a716794e41
31 files changed
+556
-246
No files matched your search
@@ -93,3 +93,27 @@ func TestRenamedAssetsPreserveMathExamples(t *testing.T) {
|
||||
t.Fatalf("公式示例被修改:%s", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestMovePreservesEntityShapedFilenames(t *testing.T) {
|
||||
v := newVault(t)
|
||||
for p, body := range map[string]string{"source.md": "[目标](target.md)", "target.md": "正文"} {
|
||||
if _, err := v.Write(p, []byte(body), Precondition{}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
const target = "a©.md"
|
||||
if _, err := v.Move("target.md", target, nil); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
body, _, err := v.Read("source.md")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
metadata := Analyze("source.md", body)
|
||||
if string(body) != "[目标](a%26copy;.md)" || len(metadata.Links) != 1 || metadata.Links[0].Target != target {
|
||||
t.Fatalf("改名后的链接指向错误:%s %+v", body, metadata.Links)
|
||||
}
|
||||
if _, _, err := v.Read(metadata.Links[0].Target); err != nil {
|
||||
t.Fatal("改写后的链接无法打开", err)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user