strip_newlines - Liquid Filter Reference
On this page
Description
Removes any newline characters (line breaks) from a string.
| Property | Value |
|---|---|
| Return Type | string |
| Category | text |
Examples
```liquid {% capture string_with_newlines %} Hello World! {% endcapture %}
{{ string_with_newlines | strip_newlines }} ```
Output: HelloWorld!