more accurate markup;
authorwenzelm
Sun, 24 Mar 2019 17:45:00 +0100
changeset 69967 8a9d0d894ec0
parent 69966 cba5b866c633
child 69968 1a400b14fd3a
more accurate markup;
src/Pure/Thy/document_marker.ML
--- a/src/Pure/Thy/document_marker.ML	Sun Mar 24 17:33:11 2019 +0100
+++ b/src/Pure/Thy/document_marker.ML	Sun Mar 24 17:45:00 2019 +0100
@@ -49,14 +49,17 @@
 
 fun evaluate input ctxt =
   let
-    val body =
-      Input.source_explode input
-      |> drop_prefix (fn (s, _) => s = Symbol.marker)
-      |> Symbol_Pos.cartouche_content;
+    val syms = Input.source_explode input
+      |> drop_prefix (fn (s, _) => s = Symbol.marker);
+    val pos = #1 (Symbol_Pos.range syms);
+
+    val _ = Context_Position.reports ctxt (map (pair pos) (Comment.kind_markups Comment.Marker));
+
+    val body = Symbol_Pos.cartouche_content syms;
     val markers =
       (case Token.read_body (Thy_Header.get_keywords' ctxt) (Parse.list parse_marker) body of
         SOME res => res
-      | NONE => error ("Bad input" ^ Position.here (Input.pos_of input)));
+      | NONE => error ("Bad input" ^ Position.here pos));
   in fold (fn src => #2 (check ctxt (Token.name_of_src src)) src) markers ctxt end;