diff options
author | Jon Purdy <evincarofautumn@gmail.com> | 2017-03-01 05:34:06 +0300 |
---|---|---|
committer | Jon Purdy <evincarofautumn@gmail.com> | 2017-03-24 23:43:07 +0300 |
commit | b058816edd4fbb453d4ab45854b56d7126501b2b (patch) | |
tree | 0274e332932f42c9e66dede47ea8b722841a8b1a /docs | |
parent | b8688a447f05eea4304134c7736c89895648dbf5 (diff) |
[exdoc] Update warnings.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/exdoc | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/docs/exdoc b/docs/exdoc index 597d62d70cd..63983db0d95 100644 --- a/docs/exdoc +++ b/docs/exdoc @@ -181,24 +181,29 @@ sub process_function { $_ = '<p>' if /^\s*$/; if ($section == $PARAMETER_SECTION) { - if (/\s*\\param +(\w+)\s+(.*)/) { + if (/\s*\\param +(\w+)(.*)/) { + # print "$file_path:$.: warning: Got parameter $1\n"; push @parameters, { name => $1, description => $2 }; - } elsif (/\s*\\deprecated +(.*)/) { + } elsif (/\s*\\deprecated(.*)/) { + # print "$file_path:$.: warning: Got deprecated annotation\n"; $deprecated = $1; } elsif (/\s*(\w+):(.*)/) { - warn "$file_path:$.: Old-style monodoc notation \@param used\n" - if $WARNINGS; if ($1 eq 'deprecated') { + warn "$file_path:$.: Old-style monodoc notation 'deprecated:' used\n" + if $WARNINGS; $deprecated = $2; } else { + warn "$file_path:$.: Old-style monodoc notation 'param:' used\n" + if $WARNINGS; push @parameters, { name => $1, description => $2 }; } } else { - $body = "\t$_\n"; + # $body = "\t$_\n"; $section = $BODY_SECTION; + redo; } } elsif ($section == $BODY_SECTION) { - if (s/(Returns?:|\\returns? )//) { + if (s/(Returns?:\s*|\\returns?\s*)//) { $returns = "\t$_\n"; $section = $RETURN_SECTION; } else { @@ -225,15 +230,15 @@ sub process_formatting { s{FALSE}{<code>FALSE</code>}g; # Parameters - warn "$file_path:$current_line: Old-style monodoc notation \@param used\n" + warn "$file_path:$current_line: Old-style monodoc notation '\@param' used\n" if s{@(\w+)}{<i>$1</i>}g && $WARNINGS; s{\\p +(\w+)}{<i>$1</i>}g; # Code - warn "$file_path:$current_line: Old-style monodoc notation #code used\n" + warn "$file_path:$current_line: Old-style monodoc notation '#code' used\n" if s{#(\w+)}{<code>$1</code>}g && $WARNINGS; - warn "$file_path:$current_line: Old-style monodoc notation `code` used\n" - if s{\`([:.\w\*]+)\`}{<code>$1</code>}g && $WARNINGS; + warn "$file_path:$current_line: Old-style monodoc notation '`code`' used\n" + if s{\`((?!api:)[:.\w\*]+)\`}{<code>$1</code>}g && $WARNINGS; s{\\c +([\w\.]+)}{<code>$1</code>}g; $$content = $_; |