Skip to content

Implement rm_newline#163

Merged
vthg2themax merged 1 commit into
rust-sailfish:mainfrom
hronro:main
Jul 1, 2025
Merged

Implement rm_newline#163
vthg2themax merged 1 commit into
rust-sailfish:mainfrom
hronro:main

Conversation

@hronro

@hronro hronro commented Jun 19, 2025

Copy link
Copy Markdown
Contributor

Currently, there is an option called rm_whitespace that removes all leading and trailing whitespaces from each line in the templates. According to the Unicode Derived Core Property, whitespace includes newlines, so I initially expected that enabling rm_whitespace would also remove newlines. However, I discovered that the current implementation explicitly retains newlines for some reason.

To avoid disrupting this existing behavior, which some users may rely on, I have added a new option called rm_newline that removes all newlines from the templates.

Please note that rm_newline can also be used when rm_whitespace is disabled.

hronro added a commit to hronro/simple-file-store that referenced this pull request Jun 30, 2025
My PR for the template engine `sailfish` is not merged yet (rust-sailfish/sailfish#163), let's use my fork for now.
@vthg2themax vthg2themax merged commit 0c7f034 into rust-sailfish:main Jul 1, 2025
7 of 9 checks passed
@vthg2themax vthg2themax self-assigned this Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants