aboutsummaryrefslogtreecommitdiffhomepage
path: root/ide/coqOps.ml
diff options
context:
space:
mode:
Diffstat (limited to 'ide/coqOps.ml')
-rw-r--r--ide/coqOps.ml8
1 files changed, 8 insertions, 0 deletions
diff --git a/ide/coqOps.ml b/ide/coqOps.ml
index e97a2ecee..6a7c2e819 100644
--- a/ide/coqOps.ml
+++ b/ide/coqOps.ml
@@ -164,6 +164,14 @@ let flags_to_color f =
else if List.mem `INCOMPLETE f then `NAME "gray"
else `NAME Preferences.processed_color#get
+let validate s =
+ let open Xml_datatype in
+ let rec validate = function
+ | PCData s -> Glib.Utf8.validate s
+ | Element (_, _, children) -> List.for_all validate children
+ in
+ validate (Richpp.repr s)
+
module Doc = Document
class coqops