Big refactor of how source files are used. Also added default destination extension option.

This commit is contained in:
spf13 2014-10-16 20:20:09 -04:00
parent 24bbfe7d32
commit 5dfc1dedb8
24 changed files with 646 additions and 465 deletions

View file

@ -20,6 +20,7 @@ import (
"strings"
"unicode"
"github.com/spf13/hugo/helpers"
jww "github.com/spf13/jwalterweatherman"
)
@ -93,7 +94,7 @@ func ShortcodesHandle(stringToParse string, p *Page, t Template) string {
var data = &ShortcodeWithPage{Params: params, Page: p}
if endStart > 0 {
s := stringToParse[leadEnd+3 : leadEnd+endStart]
data.Inner = template.HTML(renderBytes([]byte(CleanP(ShortcodesHandle(s, p, t))), p.guessMarkupType(), p.UniqueId()))
data.Inner = template.HTML(helpers.RenderBytes([]byte(CleanP(ShortcodesHandle(s, p, t))), p.guessMarkupType(), p.UniqueId()))
remainder := CleanP(stringToParse[leadEnd+endEnd:])
return CleanP(stringToParse[:leadStart]) +