question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Truncate does not work if liquid has non-breaking spaces in 9.11.10

See original GitHub issue

Hi,

Seems that the latest version does not truncate words.

var Liquid = require("liquidjs").Liquid
const engine = new Liquid({ strictVariables: true, strictFilters: true });
console.log(engine.parseAndRenderSync("{{huh | truncate: 11}}", {huh: "fdsafdsafdsafdsaaaaa"}))

Should result fdsafdsafds, but results fdsafdsafdsafdsaaaaa

working version: 9.6.0 failing version: 9.11.10

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
harttlecommented, May 1, 2020

🎉 This issue has been resolved in version 9.11.11 🎉

The release is available on:

Your semantic-release bot 📦🚀

1reaction
villesaucommented, Apr 24, 2020

Thanks a lot @harttle! I debugged this yesterday and I have to say it was super hard since there were nothing visibly wrong with the liquid 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Non-breaking Spaces: How to Check Something You Cannot ...
The quickest way is to press Ctrl+Shift+Spacebar (or on a Mac, type Option+Spacebar). Alternatively, you can select 'Non-breaking Space' from ...
Read more >
Preventing the Insertion of Non-Breaking Spaces
If you want to get rid of non-breaking spaces already in the document, then using Find and Replace is the easiest way: Press...
Read more >
How to trim no-break space in Java? - string - Stack Overflow
If the question is about trimming no_break spaces then the accepted answer is wrong.
Read more >
Removing NonBreaking Spaces - Xelplus - Leila Gharani
Sometimes the data you copy or import into Excel has stubborn spaces that can't be removed with the TRIM function.
Read more >
How to remove all extra spaces including non-breaking ...
But when it comes to non-breaking spaces, the TRIM function just fails to do the job. The reason is that the TRIM function...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found