浏览代码

link to migration guide upon HtmlElement error and remove position

Simon Krajewski 10 年之前
父节点
当前提交
a311cc5cbb
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      main.ml

+ 5 - 2
main.ml

@@ -142,7 +142,7 @@ let deprecated = [
 	"Class not found : neko.zip.Writer", "neko.zip.Writer has been removed, use haxe.zip.Writer instead";
 	"Class not found : haxe.Public", "Use @:publicFields instead of implementing or extending haxe.Public";
 	"#Xml has no field createProlog", "Xml.createProlog was renamed to Xml.createProcessingInstruction";
-	"Module js.html.HtmlElement is loaded with a different case than js.html.HTMLElement", "HtmlElement is now HTMLElement, please replace all occurences accordingly"
+	"Module js.html.HtmlElement is loaded with a different case than js.html.HTMLElement", "htmlelement"
 ]
 
 let limit_string s offset =
@@ -159,7 +159,10 @@ let limit_string s offset =
 
 let error ctx msg p =
 	let msg = try List.assoc msg deprecated with Not_found -> msg in
-	message ctx msg p;
+	if msg = "htmlelement" then
+		message ctx "There was a problem with HtmlElement, please refer to https://github.com/HaxeFoundation/html-externs/blob/master/README.md#htmlelement" null_pos
+	else
+		message ctx msg p;
 	ctx.has_error <- true
 
 let htmlescape s =