dfmt icon indicating copy to clipboard operation
dfmt copied to clipboard

version (...): odd output

Open vladdeSV opened this issue 6 years ago • 3 comments

Using version (...):, with a colon, causes weird output.

Input

version (Posix):

foo();
bar();

Output

version (Posix)  : foo();
bar();

vladdeSV avatar Nov 16 '18 11:11 vladdeSV

Purely guessing, but my guess is the colon not being considered, and dfmt acts the same way as in the following example

version (Posix)
foo();
bar();

becoming

version (Posix) foo();
bar();

vladdeSV avatar Nov 16 '18 11:11 vladdeSV

@WebFreak001 This is causing me some trouble. If I were to try and fix this myself, where would you recommend me to start poking in the code to try and fix this?

vladdeSV avatar Oct 26 '20 13:10 vladdeSV

oh yeah I was wanting to do it but didn't actually get around to it when I assigned myself.

I think the problem can be debugged by checking how the colon : is handled: either the version (...) is doing something special the other similar things aren't doing or it's all special cases.

WebFreak001 avatar Oct 29 '20 18:10 WebFreak001