src/Pure/Thy/html.ML
changeset 19305 5c16895d548b
parent 19265 cae36e16f3c0
child 19388 5cfa11eeddfe
equal deleted inserted replaced
19304:15f001295a7b 19305:5c16895d548b
   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;