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
The trim_end() part is the cause of #488: it deletes whitespaces at the end of leaves, even when they are part of the semantics.
The way I understand it, trim_end() has been added here to avoid printing leaf nodes containing a single "\n" in Bash. I think it would be better to explicitly @delete those nodes in the query, instead of silently ignoring them in the pretty-printing phase.
Line breaks are part of the semantics in Bash, I think they ought to be processed with the query mechanism, and the trim_end() call should be removed.
@Xophmeister, do you have additional insight on this issue?
The text was updated successfully, but these errors were encountered:
AFAIK, the trim_end has always been there; it wasn't added to resolve the \n nodes in Bash, which are still an issue. Does a git blame show the provenance?
It may have been added as a cheap way to get rid of white-space at end of lines. I suggest you try to remove it, and then possibly add a post-processing step or fix some queries to get green tests again.
(The post-processing step to remove whitespace at the end of lines already exists. As such, you may be able to just remove this trim_end with no consequence.)
In
pretty.rs
, we have the following piece of code:The
trim_end()
part is the cause of #488: it deletes whitespaces at the end of leaves, even when they are part of the semantics.The way I understand it,
trim_end()
has been added here to avoid printing leaf nodes containing a single"\n"
in Bash. I think it would be better to explicitly@delete
those nodes in the query, instead of silently ignoring them in the pretty-printing phase.Line breaks are part of the semantics in Bash, I think they ought to be processed with the query mechanism, and the
trim_end()
call should be removed.@Xophmeister, do you have additional insight on this issue?
The text was updated successfully, but these errors were encountered: