CodeFormatter
CodeFormatter copied to clipboard
CodeFormatterPrint output differs from FullCodeFormat
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