2

I was just answering a question asking about allowed whitespace in JavaScript code and included example code. This code snippet includes spaces, form-feeds (U+000C), line-tabulations (U+000B).

Snippet before saving:

enter image description here

While it worked well in the stack snippet code editor, as soon as I saved my answer, most of the non-space whitespace characters (form-feed, line-tabulation etc.) where removed and the snippet now throws an error.

Snippet after saving:

enter image description here

This is the original code I'd like to include in my answer: https://pastebin.com/1XFLfddv

Any idea how to fix this?

3
  • I'm doubting that this is a bug; no one would ever expect you to use any other spacing character to add spaces besides...space.
    – Makoto
    May 31, 2017 at 17:43
  • @Makoto Even in string literals? Also, I expect my code to still run after saving an answer when it runs in and after closing the stack snippet editor.
    – le_m
    May 31, 2017 at 17:46
  • 1
    Some pre-processing of the snippet has to happen, but it's a fair point that string literals wouldn't be expected to be touched.
    – Makoto
    May 31, 2017 at 17:49

0

You must log in to answer this question.

Browse other questions tagged .