cake-build / cake-build/cake

Escape curl braces in TextTransform

Open
#1,355 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
C#
Stars
4.2k
Forks
778
Avg merge
3h 37m
Merged PRs (30d)
21

Description

I'm trying to use TextTransform with an `nginx.conf` file.
The file contains braces `{`, and if I run the cake task with transformation I get the following error:

`Error: Input string was not in a correct format.`

I can escape the brace using a double character (`{{`), but then the output contains the same sequence (`{{`) instead of what I need (`{`).

I've found this closed issue: #380 but I think that it doesn't work in my case because of closing braces.

Example (working):

`var text = TransformText("{").ToString();`

Example (not working, throws the mentioned error):

`var text = TransformText("{something}").ToString();`

Contributor guide

Open the contributing guide

Research direction

Start by locating the TextTransform implementation and the tests covering brace handling, then compare the working `TransformText("{")` case with the failing `TransformText("{something}")` case. Done means braces in transformed nginx.conf content produce single braces without the formatting error or doubled output.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, nginx
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.