Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not splitting string by line breaks '\n' #396

Open
kAleksei opened this issue Oct 27, 2021 · 1 comment
Open

Not splitting string by line breaks '\n' #396

kAleksei opened this issue Oct 27, 2021 · 1 comment

Comments

@kAleksei
Copy link

kAleksei commented Oct 27, 2021

I use this extension in Xplat Release Notes VSIX package.
So faced with this issue while writing release notes template.
It uses:

"handlebars": "^4.7.7",
"handlebars-helpers": "^0.10.0"

While trying to execute split (and log the result) faced with the issue, when it's not splitting the string by \n character

{{log (split this.description "\n")}}

Log messages:

[ "Select only one item in the collection for appropriate semantic versioning:\n- [X] Major\n- [ ] Feature\n- [ ] Hotfix\n\n###Breaking changes\n - Some changes" ]
[ "# Breaking changes\n- Some changes added\n# Fixes\n- Something fixed" ]

Originally posted by @kAleksei in #300 (comment)

@kAleksei kAleksei changed the title Faced with this issue. I use this extension in [Xplat Release Notes VSIX package](https://github.com/rfennell/AzurePipelines/releases/tag/XPlat-2.6.9). Not splitting string by line breaks '\n' Oct 27, 2021
@zkent
Copy link

zkent commented Jun 6, 2023

Has anyone come up with a solution for this? I am trying to use split for strings that have a double newline such as \n\n. I can't figure out how to split them. Where is the split helper coming from? I haven't seen it in the code.

(sorry for posting this in discussion also)

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

No branches or pull requests

2 participants