Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.

Ellipsis helper breaks when passed SafeString #9

Open
xaviervalarino opened this issue Mar 30, 2016 · 0 comments
Open

Ellipsis helper breaks when passed SafeString #9

xaviervalarino opened this issue Mar 30, 2016 · 0 comments

Comments

@xaviervalarino
Copy link

ellipsis handlebars helper break when passed a handlebars SafeString, specifically on Line 233

Error Message:

Uncaught Type Error: text.split is not a function

SafeString wraps the string in an object, which in turn causes ellipsis to break when it attempts to split that object.


I came upon this error while working on Instant Answers. I was changing the output of a custom handlebars helper to a SafeString. The helper is used as a subexpression to ellipsis, and marks up any markdown that might be in the string.

{{ellipsis (parseMD string) 300}}

You can see the commit here: duckduckgo/zeroclickinfo-spice@03f5ddf

I suppose this might be a non issue, since I can just as easily return the string without using SafeString, and then wrap ellipsis in triple curly braces to make sure it's not escaped, but it seemed worthwhile to bring this to the attention of the repo maintainers.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant