Skip to content

HTML with Unicode - SyntaxError: Unexpected character """ #24

Open
@prx-lmo

Description

Steps to reproduce:

Playground with my case: https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeAhAEQPIGEAqAmgAoCiABABYwC2ANgHwA6UqAEvgLIAyzU55VACMIAEwCefAdMEBLKAAcArjHIK6AQzBxKEOqLgAnALxMQAMgDEADgBMABgDMZqYID0IiX1RuOPBiAANCAQCjCy0ADOyKAahoYQAO7EcQjRKBp0iRri0cFChloA1nAwAMoaNHDc8nDIAGaZkXD5hWAl5Qpa8gDmyDCGSi0gcDRCcKIGotwaUD1KGj1wAGIQhjQaMOFzyCAaKhBBINT0AOqUsvCRXdplaZeyAG6X4rtgkXkg8s2GMMSFPQ2DSawwAVpEAB5lXp0OAARSUEHgwLozWCXUMP12JzoRwUhnkMFOslEMEoyGs9nRCWap0KCl2+LgP0edWCAEdEfB-qF0ntIgBaKBwCYTI6GOCc2QS-6LIFIRqo4bNGiyfqDZUw+FcuoKkHBGAaITE0nkpC2A2FWR0Xq4CA0eUjSIAViOSma+CN6UVaJAjyGAEkoAZYGUwASwgBBYNlGDiWEo5oAXyTQA

it also happens this way: https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeAhAEQPIGEAqAmgAoCiABABYwC2ANgHwA6UqAEvgLIAyzU55VACMIAEwCefAdMEBLKAAcArjHIK6AQzBxKEOqLgAnALxMQAMgDEZqYID0IiX1R2OPBiAA0ICApizoAGdkUA1DQwgAd2IwhGCUDTpIjXFg7yFDLQBrOBgAZQ0aOG55OGQAM0TAuHTMsBz8hS15AHNkGEMlGpA4GiE4UQNRbg0oFqUNFrgAMQhDGg0YfzHkEA0VCC8QanoAdUpZeECm7Ty4w9kAN0PxVbBAtJB5asMYYkyWhYqq7oArQIAHnlWnQ4ABFJQQeDfOjVbxNQwvVY7OhbBSGeQwXayUQwSjIAAcAAZ4RFqrtMgpVui4C9LmVvABHSHwd6+eJrQIAWigcAGAy2hjgzNkQveky+SEqsO61RosnanVlIPBLLKUp+3hgGiE2Nx+KQACYtZlZHRWrgIDRJT1AgBWLZKar4HXxaVwkCXLoASSgBlgeTAGL8AEE-XkYOJQTDqgBfWNAA

Expected behavior:
the code gets prettified and no error is thrown
the example line should be printed as-is

Actual behavior:
SyntaxError: Unexpected character """
at the last " of placeholder="&angular#8203"

see: prettier/prettier#11822

workaround: add semikolon to the end
<input placeholder="&#8203;">

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions