'Line break is breaking API data set. Can I convert to safe character at once? | VS Code / Javascript
Can line-break break the code? If so, how can I solve it? I have more than 100 javascript API data sets like the one below.
{
ID: 1,
post_title: "ABC PLACE",
subtitle: "",
image: {
full: { url: Images.abcplace },
thump: { url: Images.abcplace },
},
location: {
locId: 35,
locName: "ABC",
latitude: 42.11111,
longitude: -73.11111,
},
address: "",
phone: "",
},
And I found that bracket color paring stopped coloring from the last 2-3 sets in VS code like this
I finally found that some of the line-break are interrupting.
If I delete one line-break, one bracket color comes back. If I delete 2, 2 colors come back. Commenting out does not solve.
But If I add the line-break back using Prettier, the color is gone again.
It does compile without any problem, but I really want to know what is going on.
I also used this website to check any hidden characters, but there is only CR LF which is a line break.
I appreciate any suggestions or comments!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
