mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2025-01-06 01:50:26 +00:00
Migrate to mycomarkup v0.3.3
Some things got fixed: * OpenGraph is (mostly) back * RocketLink display text is back But: * All links are blue, but only some of they should be
This commit is contained in:
parent
4fcf5abb37
commit
ec1eafc0e4
2
go.mod
2
go.mod
@ -5,7 +5,7 @@ go 1.14
|
||||
require (
|
||||
git.sr.ht/~adnano/go-gemini v0.1.13
|
||||
github.com/adrg/xdg v0.2.2
|
||||
github.com/bouncepaw/mycomarkup v0.3.1
|
||||
github.com/bouncepaw/mycomarkup v0.3.3
|
||||
github.com/go-ini/ini v1.62.0
|
||||
github.com/gorilla/feeds v1.1.1
|
||||
github.com/kr/pretty v0.2.1 // indirect
|
||||
|
4
go.sum
4
go.sum
@ -3,8 +3,8 @@ git.sr.ht/~adnano/go-gemini v0.1.13/go.mod h1:If1VxEWcZDrRt5FeAFnGTcM2Ud1E3BXs3V
|
||||
github.com/adrg/xdg v0.2.2 h1:A7ZHKRz5KGOLJX/bg7IPzStryhvCzAE1wX+KWawPiAo=
|
||||
github.com/adrg/xdg v0.2.2/go.mod h1:7I2hH/IT30IsupOpKZ5ue7/qNi3CoKzD6tL3HwpaRMQ=
|
||||
github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y=
|
||||
github.com/bouncepaw/mycomarkup v0.3.1 h1:5uh7PJYjTNqrA2ibZAvA50nImKECq5AWtlzTEOO32sM=
|
||||
github.com/bouncepaw/mycomarkup v0.3.1/go.mod h1:0n6thlGGgrx2Y/2NaaUH4qHW4v1xJ+EpW7yMFUxNRIg=
|
||||
github.com/bouncepaw/mycomarkup v0.3.3 h1:Mw26iJsxtIgGR0yuMrgyHEj14VchetCdDvqGlj+m4OE=
|
||||
github.com/bouncepaw/mycomarkup v0.3.3/go.mod h1:0n6thlGGgrx2Y/2NaaUH4qHW4v1xJ+EpW7yMFUxNRIg=
|
||||
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/go-ini/ini v1.62.0 h1:7VJT/ZXjzqSrvtraFp4ONq80hTcRQth1c9ZnQ3uNQvU=
|
||||
|
@ -2,7 +2,9 @@ package web
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/bouncepaw/mycomarkup"
|
||||
"github.com/bouncepaw/mycomarkup/doc"
|
||||
"github.com/bouncepaw/mycomarkup/parser"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net/http"
|
||||
@ -122,9 +124,11 @@ func handlerHypha(w http.ResponseWriter, rq *http.Request) {
|
||||
fileContentsT, errT := ioutil.ReadFile(h.TextPath)
|
||||
_, errB := os.Stat(h.BinaryPath)
|
||||
if errT == nil {
|
||||
ctx, _ := parser.ContextFromStringInput(hyphaName, "") // FIXME:
|
||||
md := doc.Doc(hyphaName, string(fileContentsT))
|
||||
contents = md.AsHTML()
|
||||
//openGraph = md.OpenGraphHTML()
|
||||
ast := md.Lex()
|
||||
contents = doc.GenerateHTML(ast, 0)
|
||||
openGraph = mycomarkup.OpenGraphHTML(ctx, ast)
|
||||
}
|
||||
if !os.IsNotExist(errB) {
|
||||
contents = views.AttachmentHTML(h) + contents
|
||||
|
Loading…
Reference in New Issue
Block a user