- changed status to open
variable replacement cannot handle embedded newlines
In the following expression: #[var cs = $(cs.Replace(<PROJECT_TAGS>, "#[var projectRev]") if the variable projectRev has newlines, the command will fail. This is true with or without quotes.
Comments (7)
-
repo owner -
repo owner if it's you - Issue #26 well...
$(cs.Replace(...
this for MSBuild core, so yes the newline symbols is not allowed and will be fail
I think need an additional component for work with special symbols... need to think
stay in touch!
-
repo owner - marked as enhancement
- changed component to SBE-Scripts
-
assigned issue to
-
repo owner - changed milestone to Started
ok, I checked variant for MSBuild
#[var cs = line1 line2] #[var cs = $(cs.Replace("\r\n", ""))]
or with different combination CR/LF
#[var cs = $(cs.Replace("\r", "").Replace("\n", ""))]
result: line1line2
so, we can use the Replace() function of the MSBuild core for any result from SBE-Scripts core
but, v0.9 is not contains handler of symbols \r\n for the MSBuild properties
this should be implemented is coming soon, and I think to include this in planned v0.10
you can watch this ticket about progress of this implementation..
Please remeber: bitbucket.org allows anonymous issue creation, but for new comments you should be authorized for this tracker
-
repo owner implemented with 4e6b15e and should be included in v0.10
now, if you have a multiline value in your variable projectRev, for example:
#[var cs = Version is a %ver% !] #[var projectRev = v1.2 debug rev321]
you should strip this with Replace on any compatible sequence, e.g.
#[var projectRev = $(projectRev.Replace("\r\n", " :: "))] #[var cs = $(cs.Replace("%ver%", "#[var projectRev]"))]
or as variant:
#[var cs = $(cs.Replace("%ver%", $(projectRev.Replace("\r\n", " :: "))))]
and similar...
note:
- use the escaping \\r \\n if need this
- use the \x00 - \xFF for other char by code
as result in variable cs we have:
Version is a v1.2 :: debug :: rev321 !
-
repo owner - changed status to on hold
available with v0.10 - see on gallery page or click here
here's the changelog entry:
CHANGED: Added handling of special symbols in MSBuild core
-
repo owner - changed milestone to Waiting
- Log in to comment
Thanks for report,
I will check this later
try also RC of planned version: v0.10_RC1_[db60b3e].vsix