We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33ef636 commit d55d229Copy full SHA for d55d229
asm/warnings.pl
@@ -11,13 +11,21 @@
11
my $err = 0;
12
my $nwarn = 0;
13
14
-sub quote_for_c($) {
+sub quote_for_c(@) {
15
my $s = join('', @_);
16
17
$s =~ s/([\"\'\\])/\\$1/g;
18
return $s;
19
}
20
21
+sub remove_markup(@) {
22
+ my $s = join('', @_);
23
+
24
+ $s =~ s/\\[\w+](\{((?:(?>[^{}]+)|(?1))*)\})?/$2/g;
25
+ $s =~ s/\\(\W)/$1/g;
26
+ return $s;
27
+}
28
29
sub add_alias($$) {
30
my($a, $this) = @_;
31
my @comp = split(/-/, $a);
@@ -162,7 +170,7 @@ sub sort_warnings {
162
170
$#warnings + 2;
163
171
print $out "\tNULL";
164
172
foreach my $warn (@warnings) {
165
- my $help = quote_for_c($warn->{help});
173
+ my $help = quote_for_c(remove_markup($warn->{help}));
166
174
print $out ",\n\t\"", $help, "\"";
167
175
168
176
print $out "\n};\n\n";
0 commit comments