Closed mootari closed 3 years ago
The inspector has different behavior when the value is top-level vs. as a descendent. This can be seen here:
https://github.com/observablehq/inspector/blob/main/src/formatString.js
When a string is top-level, the inspector applies an optimization to minimize the number of escaping characters depending on the contents of the string. The inspector will also render a “show more” button for strings with many new lines.
And when a string is not top-level, the inspector will also truncate the string to limit its length to the first and last 50 characters.
Strings in property values and arrays are wrapped in double quotes, while strings directly passed to the inspector are wrapped in backticks. This causes different outputs: