feat: add the Document edit pipeline with comment-preserving write
Test / test (push) Successful in 1m35s
Test / test (push) Successful in 1m35s
Assisted-by: GLM 5.3 Flash
This commit is contained in:
@@ -181,9 +181,12 @@ func (e *encoder) encode(v any) error {
|
||||
if x == nil {
|
||||
return fmt.Errorf("interpres: cannot marshal nil value")
|
||||
}
|
||||
return fmt.Errorf("interpres: cannot marshal a Document; marshal its Map() to write the values")
|
||||
return e.writeDocument(x)
|
||||
case Document:
|
||||
return fmt.Errorf("interpres: cannot marshal a Document; marshal its Map() to write the values")
|
||||
if x.root == nil {
|
||||
return fmt.Errorf("interpres: cannot marshal nil value")
|
||||
}
|
||||
return e.writeDocument(&x)
|
||||
case OrderedMap:
|
||||
return e.encodeOrderedMap(&x)
|
||||
case *OrderedMap:
|
||||
|
||||
Reference in New Issue
Block a user