From e2824a8430d1a6a4fef85ecb723771ddd53ec34b Mon Sep 17 00:00:00 2001 From: Paramtamtam <7326800+tarampampam@users.noreply.github.com> Date: Fri, 14 Apr 2023 19:25:46 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(docs=5Ftest.go):=20add=20com?= =?UTF-8?q?ment=20to=20clarify=20the=20purpose=20of=20normalizing=20newlin?= =?UTF-8?q?es=20in=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs_test.go b/docs_test.go index b24e56cbb7..13533d7bf2 100644 --- a/docs_test.go +++ b/docs_test.go @@ -39,7 +39,7 @@ func TestToTabularToFileBetweenTags(t *testing.T) { expectedDocs, fErr := os.ReadFile("testdata/expected-tabular-markdown-full.md") expect(t, fErr, nil) // read without error - // normalizes \r\n (windows) and \r (mac) into \n (unix) + // normalizes \r\n (windows) and \r (mac) into \n (unix) (required for tests to pass on windows) var normalizeNewlines = func(d []byte) []byte { d = bytes.Replace(d, []byte{13, 10}, []byte{10}, -1) // replace CR LF \r\n (windows) with LF \n (unix) d = bytes.Replace(d, []byte{13}, []byte{10}, -1) // replace CF \r (mac) with LF \n (unix)