--- source: crates/rome_formatter_test/src/snapshot_builder.rs info: test_file: js/multiparser-graphql/escape.js --- # Input ```js gql` "\`foo\` mutation payload." type FooPayload { bar: String } ` gql` type Project { "Pattern: \`\${project}\`" pattern: String """ Pattern: \`\${project}\` """ pattern: String # Also: Escaping the first parentheses... "Pattern: \`$\{project}\`" pattern: String # Or escaping the first and second parentheses... "Pattern: \`$\{project\}\`" pattern: String } ` gql` """ - \` - \\\` - \\ a - \\\\ - $ - \$ - \${ - \\\${ - \u1234 """ type A { a } ` ``` # Prettier differences ```diff --- Prettier +++ Rome @@ -1,12 +1,12 @@ gql` "\`foo\` mutation payload." - type FooPayload { - bar: String + type FooPayload { + bar: String } `; gql` - type Project { +type Project { "Pattern: \`\${project}\`" pattern: String """ @@ -14,13 +14,13 @@ """ pattern: String - # Also: Escaping the first parentheses... - "Pattern: \`\${project}\`" + # Also: Escaping the first parentheses... + "Pattern: \`$\{project}\`" pattern: String # Or escaping the first and second parentheses... - "Pattern: \`\${project}\`" + "Pattern: \`$\{project\}\`" pattern: String - } +} `; gql` ``` # Output ```js gql` "\`foo\` mutation payload." type FooPayload { bar: String } `; gql` type Project { "Pattern: \`\${project}\`" pattern: String """ Pattern: \`\${project}\` """ pattern: String # Also: Escaping the first parentheses... "Pattern: \`$\{project}\`" pattern: String # Or escaping the first and second parentheses... "Pattern: \`$\{project\}\`" pattern: String } `; gql` """ - \` - \\\` - \\ a - \\\\ - $ - \$ - \${ - \\\${ - \u1234 """ type A { a } `; ```