impl. Kroki, compile path, and code-editor feature
This commit is contained in:
1 parent
c1bc8f0c03
commit
94d56f9a8f
49 files changed
+40652
-389
No files matched your search
@@ -0,0 +1,24 @@
|
||||
package compiler
|
||||
|
||||
import (
|
||||
"crypto/sha256"
|
||||
"encoding/hex"
|
||||
)
|
||||
|
||||
func DiagramHash(
|
||||
diagramType string,
|
||||
source string,
|
||||
format string,
|
||||
) string {
|
||||
|
||||
sum :=
|
||||
sha256.Sum256(
|
||||
[]byte(
|
||||
diagramType + "\x00" + format + "\x00" + source,
|
||||
),
|
||||
)
|
||||
|
||||
return hex.EncodeToString(
|
||||
sum[:],
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package compiler
|
||||
|
||||
import (
|
||||
htmltomarkdown "github.com/JohannesKaufmann/html-to-markdown/v2"
|
||||
)
|
||||
|
||||
func HTMLToMarkdown(
|
||||
html string,
|
||||
) (string, error) {
|
||||
|
||||
return htmltomarkdown.ConvertString(
|
||||
html,
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user