@@ -370,6 +370,9 @@ (define (check-compiler-for-target package)
(define (properly-starts-sentence? s)
(string-match "^[(\"'`[:upper:][:digit:]]" s))
+(define (starts-with-texinfo-markup? s)
+ (string-match "^@(acronym|dfn|code|command|emph|file|quotation|samp|uref|url)\\{.*?\\}" s))
+
(define (starts-with-abbreviation? s)
"Return #t if S starts with what looks like an abbreviation or acronym."
(string-match "^[A-Z][A-Z0-9]+\\>" s))
@@ -444,6 +447,7 @@ (define (check-description-style package)
'pre "-" 'post)))
(if (or (string-null? description)
(properly-starts-sentence? description)
+ (starts-with-texinfo-markup? description)
(string-prefix-ci? first-word (package-name package))
(string-suffix-ci? first-word (package-name package)))
'()
@@ -510,7 +514,9 @@ (define (check-description-style package)
(match (check-texinfo-markup description)
((and warning (? lint-warning?)) (list warning))
(plain-description
- (check-proper-start plain-description))))
+ (if (string-prefix? "@" description)
+ '()
+ (check-proper-start plain-description)))))
(list
(make-warning package
(G_ "invalid description: ~s")
@@ -121,6 +121,11 @@ (define (warning-contains? str warnings)
(description "bad description."))))
(check-description-style pkg))))
+(test-equal "description: may start with texinfo markup"
+ '()
+ (check-description-style
+ (dummy-package "x" (description "@emph{Maxwell Equations of Software}"))))
+
(test-equal "description: may start with a digit"
'()
(let ((pkg (dummy-package "x"