From b6e996c3d9328ea49102b4970bbae8c790e0f0c7 Mon Sep 17 00:00:00 2001 From: Niko Abeler Date: Sat, 27 Aug 2022 23:01:07 +0200 Subject: [PATCH] WIP webmention parsing --- cmd/owl-web/webmention_test.go | 4 ---- go.mod | 1 + go.sum | 2 ++ post_test.go | 5 ++++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/cmd/owl-web/webmention_test.go b/cmd/owl-web/webmention_test.go index d1c7fa3..38b363f 100644 --- a/cmd/owl-web/webmention_test.go +++ b/cmd/owl-web/webmention_test.go @@ -159,7 +159,3 @@ func TestValidationOfTarget(t *testing.T) { assertStatus(t, rr, http.StatusBadRequest) } - -// -// https://www.w3.org/TR/webmention/#h-webmention-verification -// diff --git a/go.mod b/go.mod index 706569f..11cb084 100644 --- a/go.mod +++ b/go.mod @@ -6,5 +6,6 @@ require ( github.com/julienschmidt/httprouter v1.3.0 // indirect github.com/yuin/goldmark v1.4.13 // indirect github.com/yuin/goldmark-meta v1.1.0 // indirect + golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b // indirect gopkg.in/yaml.v2 v2.3.0 // indirect ) diff --git a/go.sum b/go.sum index f16969a..d929445 100644 --- a/go.sum +++ b/go.sum @@ -4,6 +4,8 @@ github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/goldmark-meta v1.1.0 h1:pWw+JLHGZe8Rk0EGsMVssiNb/AaPMHfSRszZeUeiOUc= github.com/yuin/goldmark-meta v1.1.0/go.mod h1:U4spWENafuA7Zyg+Lj5RqK/MF+ovMYtBvXi1lBb2VP0= +golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b h1:ZmngSVLe/wycRns9MKikG9OWIEjGcGAkacif7oYQaUY= +golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/post_test.go b/post_test.go index bb09bba..1d95559 100644 --- a/post_test.go +++ b/post_test.go @@ -161,9 +161,12 @@ func TestLoadMeta(t *testing.T) { if post.Meta().Draft != true { t.Errorf("Expected title: %v, got %v", true, post.Meta().Draft) } - } +/// +/// Webmention +/// + func TestAddWebmentionCreatesFile(t *testing.T) { repo := getTestRepo() repo.SetAllowRawHtml(true)