src/Tools/Code/code_printer.ML
changeset 47576 b32aae03e3d6
parent 46949 94aa7b81bcf6
child 48072 ace701efe203
equal deleted inserted replaced
47575:b90cd7016d4f 47576:b32aae03e3d6
   144           |> not is_first ? Buffer.add "\n\n"
   144           |> not is_first ? Buffer.add "\n\n"
   145           |> XML.add_content tree
   145           |> XML.add_content tree
   146           |> pair false;
   146           |> pair false;
   147         fun filter (XML.Elem (name_attrs, xs)) =
   147         fun filter (XML.Elem (name_attrs, xs)) =
   148               fold (if is_selected name_attrs then add_content_with_space else filter) xs
   148               fold (if is_selected name_attrs then add_content_with_space else filter) xs
   149           | filter (XML.Text s) = I;
   149           | filter (XML.Text _) = I;
   150       in snd (fold filter tree (true, Buffer.empty)) end;
   150       in snd (fold filter tree (true, Buffer.empty)) end;
   151 
   151 
   152 fun format presentation_names width =
   152 fun format presentation_names width =
   153   Print_Mode.setmp [code_presentationN] (Pretty.string_of_margin width)
   153   Print_Mode.setmp [code_presentationN] (Pretty.string_of_margin width)
   154   #> YXML.parse_body
   154   #> YXML.parse_body