Introduce the office Bubble Tea browser (module tree, multi-select lists, markdown preview) alongside oo, with cmd/internal/bootstrap for shared auth, unit tests across preview/model/ui/fetch, CI build for both binaries, and GoReleaser archives for office. Co-authored-by: Cursor <cursoragent@cursor.com>
20 lines
390 B
Go
20 lines
390 B
Go
package preview_test
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
|
|
"github.com/eslider/go-onlyoffice/cmd/office/preview"
|
|
)
|
|
|
|
func TestHTMLToMarkdown(t *testing.T) {
|
|
html := `<h1>Title</h1><p>Body text</p>`
|
|
md, err := preview.HTMLToMarkdown(html)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if !strings.Contains(md, "Title") || !strings.Contains(md, "Body text") {
|
|
t.Fatalf("conversion failed: %q", md)
|
|
}
|
|
}
|