Avoid reporting duplication when possible
ci/woodpecker/push/build Pipeline failed
Details
ci/woodpecker/push/build Pipeline failed
Details
Avoid reporting for meta arguments attributes of isabelle_DOF commands and for text input of text* The last reporting duplication not resolved comes from the document_command command in Isa_DOF, which parses the meta arguments twice, one time for the creation of the docitem with create_and_check_docitem which will add reporting for the attributes value (see conv_attrs whichs calls Syntax.read_term_global, which iwill add reporting) and the other for the document output with document_output which also adds reporting (see meta_args_2_latex which calls (Syntax.check_term ctxt o Syntax.parse_term ctxt) with ltx_of_markup and Syntax.parse_term also adds reporting)
This commit is contained in:
parent
ba8227e6ab
commit
ad4ad52b4e
|
@ -1510,11 +1510,14 @@ fun calc_update_term {mk_elaboration=mk_elaboration} thy cid_long
|
||||||
| SOME (_, parent_name) =>
|
| SOME (_, parent_name) =>
|
||||||
get_class_name parent_name attribute_name pos
|
get_class_name parent_name attribute_name pos
|
||||||
end
|
end
|
||||||
val attr_defined_cid = get_class_name cid_long lhs pos
|
val _ = if mk_elaboration
|
||||||
val {id, name, ...} = the (DOF_core.get_doc_class_global attr_defined_cid thy)
|
then
|
||||||
val markup = docclass_markup false cid_long id (Binding.pos_of name);
|
let val attr_defined_cid = get_class_name cid_long lhs pos
|
||||||
val ctxt = Context.Theory thy
|
val {id, name, ...} = the (DOF_core.get_doc_class_global attr_defined_cid thy)
|
||||||
val _ = Context_Position.report_generic ctxt pos markup;
|
val markup = docclass_markup false cid_long id (Binding.pos_of name);
|
||||||
|
val ctxt = Context.Theory thy
|
||||||
|
in Context_Position.report_generic ctxt pos markup end
|
||||||
|
else ()
|
||||||
val info_opt = DOF_core.get_attribute_info cid_long (Long_Name.base_name lhs) thy
|
val info_opt = DOF_core.get_attribute_info cid_long (Long_Name.base_name lhs) thy
|
||||||
val (ln,lnt,lnu,lnut) = case info_opt of
|
val (ln,lnt,lnu,lnut) = case info_opt of
|
||||||
NONE => error ("unknown attribute >"
|
NONE => error ("unknown attribute >"
|
||||||
|
@ -2130,11 +2133,11 @@ fun document_output {markdown: bool, markup: Latex.text -> Latex.text} meta_args
|
||||||
|
|
||||||
fun document_output_reports name {markdown, body} meta_args text ctxt =
|
fun document_output_reports name {markdown, body} meta_args text ctxt =
|
||||||
let
|
let
|
||||||
val pos = Input.pos_of text;
|
(*val pos = Input.pos_of text;
|
||||||
val _ =
|
val _ =
|
||||||
Context_Position.reports ctxt
|
Context_Position.reports ctxt
|
||||||
[(pos, Markup.language_document (Input.is_delimited text)),
|
[(pos, Markup.language_document (Input.is_delimited text)),
|
||||||
(pos, Markup.plain_text)];
|
(pos, Markup.plain_text)];*)
|
||||||
fun markup xml =
|
fun markup xml =
|
||||||
let val m = if body then Markup.latex_body else Markup.latex_heading
|
let val m = if body then Markup.latex_body else Markup.latex_heading
|
||||||
in [XML.Elem (m (Latex.output_name name), xml)] end;
|
in [XML.Elem (m (Latex.output_name name), xml)] end;
|
||||||
|
|
Loading…
Reference in New Issue