From d04a58675e64e5892fa3976b4e7d5a952acc0a9a Mon Sep 17 00:00:00 2001 From: Chris Mann Date: Tue, 7 Oct 2008 22:00:19 +1030 Subject: [PATCH] * wesnoth-mode.el (wesnoth-check-wml): Added tests for wml attributes' data. --- wesnoth-mode.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wesnoth-mode.el b/wesnoth-mode.el index 779f3ed..1690b71 100644 --- a/wesnoth-mode.el +++ b/wesnoth-mode.el @@ -779,12 +779,15 @@ ARGS is any additional data required by `format' to handle FORMAT-STRING." (wesnoth-check-output outbuf "Preprocessor statement does not nest correctly")) (setq unmatched-tag-list (cdr unmatched-tag-list))) - ((looking-at "^[\t ]*\\(\\(\\w\\|_\\)+\\)=") + ((looking-at "^[\t ]*\\(\\(\\w\\|_\\)+\\)=\\(.+\\)?") (unless (wesnoth-check-element-type 'third (car unmatched-tag-list)) (wesnoth-check-output outbuf "Attribute not available in this context: %s" - (match-string-no-properties 1)))) + (match-string-no-properties 1))) + (unless (match-string 3) + (wesnoth-check-output + outbuf "Attribute has no value"))) ((looking-at "^[\t ]*#else") (unless (string-match "ifn?def" (car unmatched-tag-list)) (if (string= (car unmatched-tag-list) "#define") -- 2.11.4.GIT