Azure / Azure/bicep

We should automatically escape single quotes when pasting into a string

Open
#9,997 0 comments 0 reactions 0 assignees View on GitHub
devdiv enhancement story: decompiler
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

Related to #9509
Easy to add from #9996

E.g. you have this:
```bicep
@description('')
param resourceId string
```
and you want to copy this description into the description string:
```
This represents a resource's ID
```

Currently you get this (with an error):
```bicep
@description('This represents a resource's ID')
param resourceId string
```
![image](https://user-images.githubusercontent.com/6913354/222857307-3ea00133-9118-48f3-8559-145c68b5289d.png)

EXPECTED:
```bicep
@description('This represents a resource\'s ID')
param resourceId string
```

Contributor guide

Open the contributing guide

Research direction

Read related issues #9509 and #9996 first, then reproduce the pasted description example to locate the paste-handling entry point. Done means a single quote pasted inside the Bicep single-quoted string is escaped and the resulting template no longer produces an error.

Written by the indexing model from the issue text.

Assessment

Domain
developer-experience, tooling
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.