ascherer / cweb

Literate Programming in C/C++
https://github.com/ascherer/cwebbin
86 stars 11 forks source link

Regression from CWEB 3.64c: do whatever; @+ while (...); adds second \5. #49

Closed ascherer closed 9 months ago

ascherer commented 9 months ago

Although CWEB 3.0 learned to put while directly after the statement after do, Don Knuth continues to add @+ in almost all such situations. This results in

...\5
\2\5
\&{while}

which is not reduced to a single space.

ascherer commented 9 months ago

Not a bug. It's been this way all along.

Conclusion: CWEB 3.0 learned to use the more compact layout, i.e., placing while next to the included statement. It is a user mistake to add @+ in this situation. If you do so, you have to live with the extra space.