mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2024-12-12 05:20:26 +00:00
Merge pull request #118 from bouncepaw/mycomarkup-3-migrate-and-test
Mycomarkup 3 migrate and test
This commit is contained in:
commit
820c20355f
@ -2,7 +2,7 @@ package cfg
|
||||
|
||||
// See https://mycorrhiza.wiki/hypha/configuration/header
|
||||
import (
|
||||
"github.com/bouncepaw/mycomarkup/v2/blocks"
|
||||
"github.com/bouncepaw/mycomarkup/v3/blocks"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@ -31,7 +31,7 @@ func ParseHeaderLinks(text string) {
|
||||
//
|
||||
// I do not really care.
|
||||
if strings.HasPrefix(line, "=>") {
|
||||
rl := blocks.MakeRocketLink(line, HeaderLinksHypha)
|
||||
rl := blocks.ParseRocketLink(line, HeaderLinksHypha)
|
||||
href, display := rl.Href(), rl.Display()
|
||||
HeaderLinks = append(HeaderLinks, HeaderLink{
|
||||
Href: href,
|
||||
|
11
go.mod
11
go.mod
@ -3,8 +3,7 @@ module github.com/bouncepaw/mycorrhiza
|
||||
go 1.16
|
||||
|
||||
require (
|
||||
github.com/bouncepaw/mycomarkup/v2 v2.1.3
|
||||
github.com/chekoopa/go-localize v0.4.0
|
||||
github.com/bouncepaw/mycomarkup/v3 v3.2.1
|
||||
github.com/go-ini/ini v1.62.0
|
||||
github.com/gorilla/feeds v1.1.1
|
||||
github.com/gorilla/mux v1.8.0
|
||||
@ -18,8 +17,10 @@ require (
|
||||
gopkg.in/ini.v1 v1.62.0 // indirect
|
||||
)
|
||||
|
||||
// Use this trick to test mycomarkup:
|
||||
// replace github.com/bouncepaw/mycomarkup/v2 v2.1.1 => "/Users/bouncepaw/GolandProjects/mycomarkup"
|
||||
// Use this trick to test local Mycomarkup changes, replace the path with yours,
|
||||
// but do not commit the change to the path:
|
||||
// replace github.com/bouncepaw/mycomarkup/v3 v3.2.1 => "/Users/bouncepaw/GolandProjects/mycomarkup"
|
||||
|
||||
// Use this utility every time Mycomarkup gets broken:
|
||||
// Use this utility every time Mycomarkup gets a major update:
|
||||
// https://github.com/marwan-at-work/mod
|
||||
// Or maybe just ⌘⇧R every time, the utility is kinda weird.
|
||||
|
11
go.sum
11
go.sum
@ -1,11 +1,6 @@
|
||||
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/andybalholm/brotli v1.0.2/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y=
|
||||
github.com/andybalholm/brotli v1.0.3/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
|
||||
github.com/bouncepaw/mycomarkup/v2 v2.1.3 h1:kMpuOO8TlHlAycqxYHLQMBnYjwE8UEO+ubpA6Z9/sVw=
|
||||
github.com/bouncepaw/mycomarkup/v2 v2.1.3/go.mod h1:sIvtvJFGG61ZeSUC+fNBrFmrQ2xBpTMZezk/QtxiQbk=
|
||||
github.com/chekoopa/go-localize v0.4.0 h1:XUgliKdAE0fff2MOEfjHP/Sj1Iy6Yxn4zXOj3jXfDE8=
|
||||
github.com/chekoopa/go-localize v0.4.0/go.mod h1:bMeziCOnL4H5lGOy2o0eWBRNht2x2RRNWGKZ4oDuxNU=
|
||||
github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y=
|
||||
github.com/bouncepaw/mycomarkup/v3 v3.2.1 h1:Gtot9+3Ds0rqQ+T9BvBIMYgYn13vL9L1yozXVeVsrBQ=
|
||||
github.com/bouncepaw/mycomarkup/v3 v3.2.1/go.mod h1:BpiGUVsYCgRZCDxF0iIdc08LJokm/Ab36S/Hif0J6D0=
|
||||
github.com/go-ini/ini v1.62.0 h1:7VJT/ZXjzqSrvtraFp4ONq80hTcRQth1c9ZnQ3uNQvU=
|
||||
github.com/go-ini/ini v1.62.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
|
||||
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
|
@ -1,14 +1,14 @@
|
||||
package hyphae
|
||||
|
||||
import (
|
||||
"github.com/bouncepaw/mycomarkup/v2/tools"
|
||||
"github.com/bouncepaw/mycomarkup/v3/tools"
|
||||
"os"
|
||||
|
||||
"github.com/bouncepaw/mycorrhiza/util"
|
||||
|
||||
"github.com/bouncepaw/mycomarkup/v2"
|
||||
"github.com/bouncepaw/mycomarkup/v2/links"
|
||||
"github.com/bouncepaw/mycomarkup/v2/mycocontext"
|
||||
"github.com/bouncepaw/mycomarkup/v3"
|
||||
"github.com/bouncepaw/mycomarkup/v3/links"
|
||||
"github.com/bouncepaw/mycomarkup/v3/mycocontext"
|
||||
)
|
||||
|
||||
// Using set here seems like the most appropriate solution
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"github.com/bouncepaw/mycorrhiza/hyphae"
|
||||
"github.com/bouncepaw/mycorrhiza/views"
|
||||
|
||||
"github.com/bouncepaw/mycomarkup/v2/globals"
|
||||
"github.com/bouncepaw/mycomarkup/v3/globals"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -125,7 +125,7 @@ article ul, ol { padding-left: 1.5rem; margin: .5rem 0; }
|
||||
article code { padding: .1rem .3rem; border-radius: .25rem; font-size: 90%; font-family: 'Menlo', 'PT Mono', monospace; }
|
||||
article pre.codeblock { padding:.5rem; white-space: pre-wrap; border-radius: .25rem;}
|
||||
.codeblock code {padding:0; font-size:15px;}
|
||||
.transclusion { border-radius: .25rem; margin-bottom: .25rem; }
|
||||
.transclusion { border-radius: .25rem; margin-bottom: .25rem; clear: both; }
|
||||
.transclusion_failed { padding: 0 .5rem; }
|
||||
.transclusion__content > *:not(.binary-container) {margin: 0.5rem; }
|
||||
.transclusion__link {display: block; float: right; text-align: right; font-style: italic; margin-right: .25rem; text-decoration: none;}
|
||||
@ -156,8 +156,7 @@ figcaption { padding-bottom: .5rem; }
|
||||
|
||||
#new-name {width:100%;}
|
||||
|
||||
|
||||
.prevnext__el { display: inline-block; min-width: 40%; padding: .5rem; margin-bottom: .25rem; text-decoration: none; border-radius: .25rem; max-width: 49%; }
|
||||
.prevnext__el { display: inline-block; min-width: 40%; padding: .5rem 0; margin-bottom: .25rem; text-decoration: none; border-radius: .25rem; max-width: 49%; }
|
||||
.prevnext__prev { float: left; }
|
||||
.prevnext__next { float: right; text-align: right; }
|
||||
|
||||
@ -195,7 +194,6 @@ p code,
|
||||
article .codeblock,
|
||||
.img-gallery_many-images,
|
||||
.recent-changes__entry,
|
||||
.prevnext__el,
|
||||
table,
|
||||
.transclusion_stand-out {
|
||||
background-color: rgba(220, 220, 220, 0.5);
|
||||
@ -223,6 +221,7 @@ blockquote { border-left: 2px #999 solid; }
|
||||
.wikilink_new:visited {color:#a55858;}
|
||||
.navi-title { border-bottom: #eee 1px solid; }
|
||||
.upload-amnt { border: #eee 1px solid; }
|
||||
.prevnext { border-top: #eee 1px solid; }
|
||||
td { border: #ddd 1px solid; }
|
||||
|
||||
.sibling-hyphae__link:hover { background-color: #eee; }
|
||||
@ -251,7 +250,6 @@ article .codeblock,
|
||||
.img-gallery_many-images,
|
||||
.recent-changes__entry,
|
||||
.history__entry,
|
||||
.prevnext__el,
|
||||
.upload-amnt,
|
||||
textarea,
|
||||
table { border: 0; background-color: #444444; color: #ddd; }
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/bouncepaw/mycomarkup/v2/util"
|
||||
"github.com/bouncepaw/mycomarkup/v3/util"
|
||||
"github.com/bouncepaw/mycorrhiza/cfg"
|
||||
)
|
||||
|
||||
|
@ -275,7 +275,7 @@ sort.Strings(editors)
|
||||
<section>
|
||||
<h1>{%s lc.Get("ui.about_title", &l18n.Replacements{"name": cfg.WikiName}) %}</h1>
|
||||
<ul>
|
||||
<li><b>{%s= lc.Get("ui.about_version", &l18n.Replacements{"pre": "<a href=\"https://mycorrhiza.wiki\">", "post": "</a>"}) %}</b> 1.5.0</li>
|
||||
<li><b>{%s= lc.Get("ui.about_version", &l18n.Replacements{"pre": "<a href=\"https://mycorrhiza.wiki\">", "post": "</a>"}) %}</b> 1.6.0</li>
|
||||
{%- if cfg.UseAuth -%}
|
||||
<li><b>{%s lc.Get("ui.about_usercount") %}</b> {%dul user.Count() %}</li>
|
||||
<li><b>{%s lc.Get("ui.about_homepage") %}</b> <a href="/">{%s cfg.HomeHypha %}</a></li>
|
||||
|
@ -1105,8 +1105,8 @@ func StreamAboutHTML(qw422016 *qt422016.Writer, lc *l18n.Localizer) {
|
||||
<li><b>`)
|
||||
//line views/stuff.qtpl:278
|
||||
qw422016.N().S(lc.Get("ui.about_version", &l18n.Replacements{"pre": "<a href=\"https://mycorrhiza.wiki\">", "post": "</a>"}))
|
||||
//line views/stuff.qtpl:278
|
||||
qw422016.N().S(`</b> 1.5.0</li>
|
||||
//line views/stuff.qtpl:277
|
||||
qw422016.N().S(`</b> 1.6.0</li>
|
||||
`)
|
||||
//line views/stuff.qtpl:279
|
||||
if cfg.UseAuth {
|
||||
|
@ -5,8 +5,8 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/bouncepaw/mycomarkup/v2"
|
||||
"github.com/bouncepaw/mycomarkup/v2/mycocontext"
|
||||
"github.com/bouncepaw/mycomarkup/v3"
|
||||
"github.com/bouncepaw/mycomarkup/v3/mycocontext"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
|
||||
|
@ -20,9 +20,9 @@ import (
|
||||
"github.com/bouncepaw/mycorrhiza/util"
|
||||
"github.com/bouncepaw/mycorrhiza/views"
|
||||
|
||||
"github.com/bouncepaw/mycomarkup/v2"
|
||||
"github.com/bouncepaw/mycomarkup/v2/mycocontext"
|
||||
"github.com/bouncepaw/mycomarkup/v2/tools"
|
||||
"github.com/bouncepaw/mycomarkup/v3"
|
||||
"github.com/bouncepaw/mycomarkup/v3/mycocontext"
|
||||
"github.com/bouncepaw/mycomarkup/v3/tools"
|
||||
)
|
||||
|
||||
func initReaders(r *mux.Router) {
|
||||
|
@ -20,8 +20,8 @@ import (
|
||||
"github.com/bouncepaw/mycorrhiza/util"
|
||||
"github.com/bouncepaw/mycorrhiza/views"
|
||||
|
||||
"github.com/bouncepaw/mycomarkup/v2"
|
||||
"github.com/bouncepaw/mycomarkup/v2/mycocontext"
|
||||
"github.com/bouncepaw/mycomarkup/v3"
|
||||
"github.com/bouncepaw/mycomarkup/v3/mycocontext"
|
||||
)
|
||||
|
||||
func initStuff(r *mux.Router) {
|
||||
|
Loading…
Reference in New Issue
Block a user