Have dumbindent handle multi-line strings/comments

Fixes #31
This commit is contained in:
Nigel Tao committed 2020-06-06 22:32:39 +10:00
1 parent 3d7af06727
commit 6424bae087
4 files changed
+89 -42

No files matched your search

+1 -7
View File
@@ -44,9 +44,6 @@
// ----
//
// There are no configuration options (e.g. tabs versus spaces).
//
// Known bug: it cannot handle /* slash-star comments */ or multi-line strings
// yet. This is tracked at https://github.com/google/wuffs/issues/31
package main
import (
@@ -145,10 +142,7 @@ func do(r io.Reader, filename string) error {
return err
}
dst, err := dumbindent.FormatBytes(nil, src)
if err != nil {
return err
}
dst := dumbindent.FormatBytes(nil, src)
if r != nil {
if _, err := os.Stdout.Write(dst); err != nil {