From 080afbf9b54e428285c096e6b8d242047a77ec22 Mon Sep 17 00:00:00 2001 From: ddddddO Date: Sat, 16 Jul 2022 11:35:15 +0900 Subject: [PATCH 1/2] modify nits --- calendar.go | 2 +- calendar_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/calendar.go b/calendar.go index 8a69488..b2d83cc 100644 --- a/calendar.go +++ b/calendar.go @@ -55,7 +55,7 @@ func (c *Calendar) String() string { } func (c *Calendar) HTML() string { - md := []byte(c.String()) + md := c.buf.Bytes() html := markdown.ToHTML(md, nil, nil) return string(html) } diff --git a/calendar_test.go b/calendar_test.go index 0eb12ff..5060617 100644 --- a/calendar_test.go +++ b/calendar_test.go @@ -11,7 +11,7 @@ import ( var jst = time.FixedZone("JST", +9*60*60) -func TestString(t *testing.T) { +func TestCalendar_String(t *testing.T) { tests := []struct { name string date time.Time @@ -99,7 +99,7 @@ func TestString(t *testing.T) { } } -func TestHTML(t *testing.T) { +func TestCalendar_HTML(t *testing.T) { tests := []struct { name string date time.Time From c77cf4d8ffb07277e989befe69f7c80487dab60c Mon Sep 17 00:00:00 2001 From: ddddddO Date: Sat, 16 Jul 2022 11:36:04 +0900 Subject: [PATCH 2/2] update credits --- CREDITS | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/CREDITS b/CREDITS index f3e7637..6204582 100644 --- a/CREDITS +++ b/CREDITS @@ -38,7 +38,7 @@ ISC License Copyright (c) 2012-2016 Dave Collins -Permission to use, copy, modify, and distribute this software for any +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. @@ -52,6 +52,43 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ================================================================ +github.com/gomarkdown/markdown +https://github.com/gomarkdown/markdown +---------------------------------------------------------------- +Markdown is distributed under the Simplified BSD License: + +Copyright © 2011 Russ Ross +Copyright © 2018 Krzysztof Kowalczyk +Copyright © 2018 Authors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided with + the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +================================================================ + github.com/holiday-jp/holiday_jp-go https://github.com/holiday-jp/holiday_jp-go ----------------------------------------------------------------