New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shortcode panic #193

Closed
jcdny opened this Issue Feb 5, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@jcdny

jcdny commented Feb 5, 2014

The following shortcode produces a panic in shortcode.Tokenize() (space between class= and the doublequote):

{{% img src="/x.jpg" class= "right" %}}
panic: keys and final different lengths

goroutine 1 [running]:
runtime.panic(0x31f060, 0xc210117cf0)
    /opt/go/release/src/pkg/runtime/panic.c:266 +0xb6
github.com/spf13/hugo/hugolib.Tokenize(0xc210022e7e, 0x61, 0xa62b68, 0xc2100eb680)
    /Users/davis/go/src/github.com/spf13/hugo/hugolib/shortcode.go:196 +0x8e1

@spf13 spf13 added the bug label Feb 6, 2014

@spf13

This comment has been minimized.

Contributor

spf13 commented Feb 6, 2014

Thanks for the report. Will look into it.

abh added a commit to abh/hugo that referenced this issue Feb 20, 2014

@spf13 spf13 closed this in 82fdfa2 Feb 20, 2014

spf13 added a commit that referenced this issue Feb 26, 2014

Shortcode cleanup. Added a ton of tests. Much more flexible with inpu…
…t. Doesn't crash with bad input. Fixed #193

Also added the .Get function to short codes and documentation for that function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment