Extract Grammaratur, Dregarnuhr, Geduldh, Mestionora, Ordoschnellic, Schutzaria, Kunstzeal and Seheweit behind compatible application contracts. Include accumulated editor resilience, navigation and theme UX, remote CLI, storage/schema and DR groundwork, tests and design/operations documentation. Verified: uncached full Go suite; go vet ./...; race tests for all eight components; 11 targeted Chromium tests; Node suites; 19 Python CLI tests; reproducible editor build. No push, release tag or deployment in this checkpoint.
19 lines
641 B
Go
19 lines
641 B
Go
package grammaratur
|
|
|
|
import (
|
|
htmltomarkdown "github.com/JohannesKaufmann/html-to-markdown/v2"
|
|
"github.com/gomarkdown/markdown"
|
|
)
|
|
|
|
// HTMLToMarkdown is the existing ordinary conversion, used by integrations
|
|
// which do not understand protected authoring blocks. It can be lossy.
|
|
func HTMLToMarkdown(source string) (string, error) {
|
|
return htmltomarkdown.ConvertString(source)
|
|
}
|
|
|
|
// MarkdownToHTML preserves the existing Markdown dialect and renderer options.
|
|
// It neither interprets authoring fences nor sanitizes the returned HTML.
|
|
func MarkdownToHTML(source string) string {
|
|
return string(markdown.ToHTML([]byte(source), nil, nil))
|
|
}
|