You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Do you want to request a feature or report a bug?
feature
- What is the current behavior?
Accidental trailing whitespace has a tendency of sneaking into fields when the user isn't careful, especially when pasting multiple lines of text.
Currently the string widget does not perform any trimming, if you enter foo␣␣ (where ␣ means space), it will end up like this in the front matter:
myField: 'foo '
The markdown widget, on the other hand, removes trailing whitespace on the last line (but not the preceding lines/paragraphs), so entering foo␣␣⏎bar␣␣⏎⏎quux␣␣ will come out as:
myField: |- foo \ bar␣␣ quux
Notice the absence of trailing whitespace after quux.
- What is the expected behavior?
That trailing whitespace is handled consistently by all widgets. To me it would be very useful if trailing whitespace on each line would be removed by both the markdown and string widgets.
It's not huge deal, but it would save me from manually sanitizing the markdown files.
The text was updated successfully, but these errors were encountered:
Two spaces at the end of a line in markdown indicates a soft break, so we'll need to leave those, but otherwise you're right, there's no representation of trailing whitespace in a markdown AST (at least for Commonmark).
Makes sense to trim the string widgets too, but open to other opinions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
- Do you want to request a feature or report a bug?
feature
- What is the current behavior?
Accidental trailing whitespace has a tendency of sneaking into fields when the user isn't careful, especially when pasting multiple lines of text.
Currently the
string
widget does not perform any trimming, if you enterfoo␣␣
(where␣
means space), it will end up like this in the front matter:The
markdown
widget, on the other hand, removes trailing whitespace on the last line (but not the preceding lines/paragraphs), so enteringfoo␣␣⏎bar␣␣⏎⏎quux␣␣
will come out as:Notice the absence of trailing whitespace after
quux
.- What is the expected behavior?
That trailing whitespace is handled consistently by all widgets. To me it would be very useful if trailing whitespace on each line would be removed by both the
markdown
andstring
widgets.It's not huge deal, but it would save me from manually sanitizing the markdown files.
The text was updated successfully, but these errors were encountered: