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

Ellipsis helper breaks when passed SafeString #9

@xaviervalarino

Description

@xaviervalarino

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions