src/Pure/Thy/thy_edit.ML
changeset 26881 bb68f50644a9
parent 23803 11bf7af10ec8
child 27353 71c4dd53d4cb
equal deleted inserted replaced
26880:ebcd5c23dd96 26881:bb68f50644a9
   114 
   114 
   115 
   115 
   116 (* HTML presentation -- example *)
   116 (* HTML presentation -- example *)
   117 
   117 
   118 fun present_html inpath outpath =
   118 fun present_html inpath outpath =
   119   Source.exhaust (item_source (Position.path inpath) (Source.of_string (File.read inpath)))
   119   Source.exhaust (item_source (Path.position inpath) (Source.of_string (File.read inpath)))
   120   |> HTML.html_mode (implode o map present_item)
   120   |> HTML.html_mode (implode o map present_item)
   121   |> enclose
   121   |> enclose
   122     (HTML.begin_document (Path.implode (Path.base inpath)) ^ "<div class=\"source\"><pre>")
   122     (HTML.begin_document (Path.implode (Path.base inpath)) ^ "<div class=\"source\"><pre>")
   123     ("</pre></div>" ^ HTML.end_document)
   123     ("</pre></div>" ^ HTML.end_document)
   124   |> File.write outpath;
   124   |> File.write outpath;