summaryrefslogtreecommitdiffstats
path: root/output
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-03-23 20:05:10 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-03-27 15:43:56 +0200
commitd851d6b98fefbe7de91c8c58b883cca4da17eea9 (patch)
tree5171cf499aef5d69ef00ef3b4bcdca777363060b /output
parent8bcc08e3b0ddd5762101bb2f061e0be04ecd8d57 (diff)
Add custom protocol support in Permalink
Diffstat (limited to 'output')
-rw-r--r--output/outputFormat.go11
-rw-r--r--output/outputFormat_test.go1
2 files changed, 7 insertions, 5 deletions
diff --git a/output/outputFormat.go b/output/outputFormat.go
index efc0cd85f..c50d74f3f 100644
--- a/output/outputFormat.go
+++ b/output/outputFormat.go
@@ -72,11 +72,12 @@ var (
)
var builtInTypes = map[string]Format{
- strings.ToLower(AMPType.Name): AMPType,
- strings.ToLower(CSSType.Name): CSSType,
- strings.ToLower(HTMLType.Name): HTMLType,
- strings.ToLower(JSONType.Name): JSONType,
- strings.ToLower(RSSType.Name): RSSType,
+ strings.ToLower(AMPType.Name): AMPType,
+ strings.ToLower(CalendarType.Name): CalendarType,
+ strings.ToLower(CSSType.Name): CSSType,
+ strings.ToLower(HTMLType.Name): HTMLType,
+ strings.ToLower(JSONType.Name): JSONType,
+ strings.ToLower(RSSType.Name): RSSType,
}
type Formats []Format
diff --git a/output/outputFormat_test.go b/output/outputFormat_test.go
index efc31a223..a76c50aee 100644
--- a/output/outputFormat_test.go
+++ b/output/outputFormat_test.go
@@ -30,6 +30,7 @@ func TestDefaultTypes(t *testing.T) {
require.Equal(t, "HTML", HTMLType.Name)
require.Equal(t, media.HTMLType, HTMLType.MediaType)
require.Empty(t, HTMLType.Path)
+ require.Empty(t, HTMLType.Protocol) // Will inherit the BaseURL protocol.
require.False(t, HTMLType.IsPlainText)
require.Equal(t, "RSS", RSSType.Name)