From 43428e759d9fbc5a319c2b929bfb4469938cc386 Mon Sep 17 00:00:00 2001 From: clsr Date: Thu, 23 Dec 2021 01:54:47 +0000 Subject: Add EscapeAll and escape all spaces in links --- write_test.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'write_test.go') diff --git a/write_test.go b/write_test.go index 18809b1..8cca449 100644 --- a/write_test.go +++ b/write_test.go @@ -13,22 +13,23 @@ var writeTests = map[string]*Document{ }, "title\n\tfoo bar baz\n" + - "links\n\tqwe asd\n\tzxc 123\n\tfoo\n" + - "site\n\tfoo\n\t\tbar\n\t\tbaz/quux\n\t\t\t123\n\ttest\n": &Document{ + "links\n\tqwe\\ asd zxc 123\n\tfoo\n" + + "site\n\tfoo Foo\n\t\tbar\n\t\tbaz/qu\\ ux Test\n\t\t\t123\n\ttest\n": &Document{ Title: "foo bar baz", Links: []Link{ - Link{"qwe", "asd", ""}, - Link{"zxc", "123", ""}, + Link{"qwe asd", "zxc 123", ""}, Link{"foo", "", ""}, }, Site: Site{ Children: []Site{ Site{ Path: "foo", + Name: "Foo", Children: []Site{ Site{Path: "bar"}, Site{ - Path: "baz/quux", + Path: "baz/qu ux", + Name: "Test", Children: []Site{ Site{Path: "123"}, }, -- cgit