caolan / caolan/pithy

Passing SafeString as content

Open
#3 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
432
Forks
22
PR merge metrics
No merged PRs in 30d

Description

Doesn't work:

```
> pithy.button('.button', new pithy.SafeString('string'))
g.SafeString {_value: "", toString: function, valueOf: function}
```

Works:

```
> pithy.button('.button', [new pithy.SafeString('string')])
g.SafeString {_value: "string", toString: function, valueOf: function}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the direct and array-wrapped SafeString examples from the issue, then inspect the pithy.button entry point and its SafeString content handling. The fix is complete when passing a SafeString directly produces the same button content as passing it in an array, with regression coverage for both forms.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.