Skip to content

String representation of expressions with quotes in non-standard string literals #35305

@pfarndt

Description

@pfarndt

The string representation of an expression that contains quotes " in triple-quoted non-standard string literals (or escaped quotes in quoted non-standard string literals) is not faithfully any more. The resulting text does not represent valid Julia code and cannot be included again. in Julia v1.4

julia> print(:(r = r"""45 " """))
r = r"45 " "
julia> print(:(r = r"45 \" "))
r = r"45 " "

This does not happen for "normal" strings

julia> print(:(r = "45 \" "))
r = "45 \" "

and also used to work in Julia v1.3.1. See also https://discourse.julialang.org/t/string-representation-of-expression/36729/3?u=pfarndt

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or unintended behaviordisplay and printingAesthetics and correctness of printed representations of objects.regressionRegression in behavior compared to a previous version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions