equal
deleted
inserted
replaced
221 | output_syms (s :: ss) = output_sym s :: output_syms ss |
221 | output_syms (s :: ss) = output_sym s :: output_syms ss |
222 | output_syms [] = []; |
222 | output_syms [] = []; |
223 in |
223 in |
224 |
224 |
225 fun output_width str = |
225 fun output_width str = |
226 if not (exists_string (equal "\\" orf equal "<" orf equal ">" orf equal "&") str) |
226 if not (exists_string (fn s => s = "\\" orelse s = "<" orelse s = ">" orelse s = "&") str) |
227 then Symbol.default_output str |
227 then Symbol.default_output str |
228 else |
228 else |
229 let val (syms, width) = fold_map (fn (w, s) => fn width => (s, w + width)) |
229 let val (syms, width) = fold_map (fn (w, s) => fn width => (s, w + width)) |
230 (output_syms (Symbol.explode str)) 0.0 |
230 (output_syms (Symbol.explode str)) 0.0 |
231 in (implode syms, width) end; |
231 in (implode syms, width) end; |