equal
deleted
inserted
replaced
223 |
223 |
224 fun scripts ss = #2 (foldl_map script (0, ss @ [""])); |
224 fun scripts ss = #2 (foldl_map script (0, ss @ [""])); |
225 in |
225 in |
226 |
226 |
227 fun output_width str = |
227 fun output_width str = |
228 if not (exists_string (equal "<" orf equal ">" orf equal "&") str) |
228 if not (exists_string (equal "\\" orf equal "<" orf equal ">" orf equal "&") str) |
229 then (str, real (size str)) |
229 then Symbol.default_output str |
230 else |
230 else |
231 let val (width, syms) = foldl_map add_sym (0.0, map output_sym (Symbol.explode str)) |
231 let val (width, syms) = foldl_map add_sym (0.0, map output_sym (Symbol.explode str)) |
232 in (implode (scripts syms), width) end; |
232 in (implode (scripts syms), width) end; |
233 |
233 |
234 val output = #1 o output_width; |
234 val output = #1 o output_width; |