Skip to content

Commit

Permalink
Merge pull request #6 from kabukky/development
Browse files Browse the repository at this point in the history
Fixed: Bug when parsing helper arguments.
  • Loading branch information
kabukky committed Apr 25, 2015
2 parents eddfea1 + 2585cce commit 7a697ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -10,7 +10,7 @@ Please note that Journey is still in alpha and has not been tested in production
Create or update your posts from any place and any device. Simply point your browser to yourblog.url/admin/, log in, and start typing away!

#### Extensible
Write plugins in Lua to implement custom behavior when generating pages. Learn how to on the [Wiki](https://github.com/kabukky/journey/wiki/Creating-a-Journey-Plugin)!
Write plugins in Lua to implement custom behavior when generating pages. Learn how to do it on the [Wiki](https://github.com/kabukky/journey/wiki/Creating-a-Journey-Plugin)!

#### Good stuff available right away
Use Ghost themes to design your blog. There's already a great community of designers working on Ghost compatible themes. Check out the [Ghost Marketplace](http://marketplace.ghost.org) to get an idea.
Expand Down
5 changes: 3 additions & 2 deletions templates/generation.go
Expand Up @@ -50,7 +50,8 @@ func createHelper(helperName []byte, unescaped bool, startPos int, block []byte,
//remove "" around tag if present
quoteTagResult := quoteTagChecker.FindSubmatch(tag)
if len(quoteTagResult) != 0 {
tag = quoteTagResult[1]
// Get the string inside the quotes (3rd element in array)
tag = quoteTagResult[2]
}
//TODO: This may have to change if the first argument is surrounded by quotes
if index == 0 {
Expand All @@ -65,7 +66,7 @@ func createHelper(helperName []byte, unescaped bool, startPos int, block []byte,
// Check for quotes in the =argument (has beem omitted from the check above)
quoteTagResult := quoteTagChecker.FindSubmatch(arg)
if len(quoteTagResult) != 0 {
// Join poth parts, this time without the youtes
// Join poth parts, this time without the quotes
arg = bytes.Join([][]byte{quoteTagResult[1], quoteTagResult[2]}, []byte(""))
}
helper.Arguments = append(helper.Arguments, *makeHelper(string(arg), unescaped, 0, []byte{}, nil))
Expand Down

0 comments on commit 7a697ce

Please sign in to comment.