I\'ve figured out how to display the repeating part of a repeating decimal using OverBar.
repeatingDecimal doesn\'t actually work as a repeating decimal
Here is a possible refactoring of your updated code. I think it works this time (fingers crossed). If you do not need the color highlighting, you can leave off ~Style~ and the rest of that line.
ClearAll[repeatingDecimal];
Format[repeatingDecimal[n_Integer | n_Real]] := n;
Format[repeatingDecimal[q_Rational]] :=
Row[{IntegerPart@q, ".", RealDigits@FractionalPart@q}] /.
{{ nr___Integer, r_List:{} }, pt_} :>
Row@Join[
"0" ~Table~ {-pt},
{nr},
If[r === {}, {}, {OverBar@Row@r}]
] ~Style~ If[r === {}, Blue, If[{nr} === {}, Red, Gray]]
repeatingDecimal /:
(h : Plus | Times)[left___, repeatingDecimal[q_], right___] :=
h[left, q, right];
I will leave this older version here for reference, but I am now making edits to the Question community wiki.