Description
Interpolated strings in F# support the format specifiers described in the F# Plain Text Formatting documentation. This includes producing a literal %
character by prefixing it with another %
.
This no longer works when the sequence of characters is immediately followed by a format specifier.
Repro steps
Microsoft (R) F# Interactive version 12.9.100.0 for F# 9.0
> let x = "abc";;
val x: string = "abc"
> $"%%%s{x}%%";;
val it: string = "abc%"
Note that this works as expected in F# 8.0:
Microsoft (R) F# Interactive version 12.8.400.0 for F# 8.0
> let x = "abc";;
val x: string = "abc"
> $"%%%s{x}%%";;
val it: string = "%abc%"
Related information
Tested with sdk-9.0.101-macos-arm64
.
Metadata
Metadata
Assignees
Type
Projects
Status
Done