CodeFormatter icon indicating copy to clipboard operation
CodeFormatter copied to clipboard

CodeFormatterPrint output differs from FullCodeFormat

Open Masterxilo opened this issue 9 years ago • 0 comments

From the code it seems as if CodeFormatterPrint uses FullCodeFormat, but on a given definition their output still differs:

ClearAll[f]
f[x : _a | _b] := 0;
CodeFormatterPrint@f
f[x : (Blank[a] | Blank[b])] :=
     0

is not as nice as

boxes = MakeBoxes[f[x : _a | _b] := 0];
prn = CellPrint[Cell[BoxData[#], "Input"]] &;
prn@FullCodeFormat@boxes
f[x : _a | _b] :=
     0

Masterxilo avatar Aug 08 '16 16:08 Masterxilo