Skip to content

Commit

Permalink
add fail test
Browse files Browse the repository at this point in the history
  • Loading branch information
szktkfm committed Mar 24, 2024
1 parent 0ef74d0 commit fe80112
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 857 deletions.
2 changes: 1 addition & 1 deletion printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (t *TableWriter) replaceTable(fp *os.File) []byte {
// var tableDelimRight = regexp.MustCompile(`^\s*\-+\:\s*$`)
// var tableDelimCenter = regexp.MustCompile(`^\s*\:\-+\:\s*$`)
// var tableDelimNone = regexp.MustCompile(`^\s*\-+\s*$`)
var tableDelim = regexp.MustCompile(`^\s*\|?\s*\-+\s*\|?\s*`)
var tableDelim = regexp.MustCompile(`^\s*\|?\s*\-+(\s*|\|?|\-+)*$`)

func (t *TableWriter) findSegment(fp io.Reader) {
// fmt.Println([]byte(fmt.Sprint(fp)))
Expand Down
5 changes: 5 additions & 0 deletions printer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ func TestReplaceTable(t *testing.T) {
wnt: "testdata/replace_want01.md",
},
// Add more test cases here
{
name: "Test Case 2",
src: "testdata/replace02.md",
wnt: "testdata/replace_want02.md",
},
}

for _, tc := range testCases {
Expand Down
Loading

0 comments on commit fe80112

Please sign in to comment.