From 8c607c8561feb0948ae29329be8fa3043990d542 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Fri, 14 Nov 2014 23:27:37 -0500 Subject: Rename `unxhtmlify_line` -> `unxhtmlify_string` The word "line" didn't really make sense since the function doesn't care about lines. I started with that naming because it made sense in terms of the implementation, or of the reading of a buffer and unxhtmlifying. --- unxhtmlify.go | 2 +- unxhtmlify_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/unxhtmlify.go b/unxhtmlify.go index 7013d74..50b4f5f 100644 --- a/unxhtmlify.go +++ b/unxhtmlify.go @@ -17,7 +17,7 @@ func main() { } } -func unxhtmlify_line(s string) string { +func unxhtmlify_string(s string) string { re := regexp.MustCompile(" ?/>") return re.ReplaceAllString(s, ">") } diff --git a/unxhtmlify_test.go b/unxhtmlify_test.go index 9ac238d..7091a8e 100644 --- a/unxhtmlify_test.go +++ b/unxhtmlify_test.go @@ -2,7 +2,7 @@ package main import "testing" -func TestUnxhtmlifyLine(t *testing.T) { +func TestUnxhtmlifyString(t *testing.T) { var tests = []struct { input, expected string }{ -- cgit v1.2.3