53 |
|
|
54 |
my $class = qq[level-$error_level layer-$error_layer]; |
my $class = qq[level-$error_level layer-$error_layer]; |
55 |
|
|
56 |
$out->start_tag ('dt', class => $class); |
## Line & column numbers (prepare values) |
|
my $has_location; |
|
|
|
|
|
## URL |
|
|
|
|
|
if (defined $opt{url}) { |
|
|
$out->url ($opt{url}); |
|
|
$has_location = 1; |
|
|
} |
|
|
|
|
|
## Line & column number |
|
57 |
|
|
58 |
my $line; |
my $line; |
59 |
my $column; |
my $column; |
87 |
$column = $opt{column}; |
$column = $opt{column}; |
88 |
} |
} |
89 |
} |
} |
90 |
|
$line = $line - 1 || 1 |
91 |
|
if defined $line and not (defined $column and $column > 0); |
92 |
|
|
93 |
|
$out->start_tag ('dt', class => $class, |
94 |
|
'data-type' => $opt{type}, |
95 |
|
'data-level' => $error_level, |
96 |
|
'data-layer' => $error_layer, |
97 |
|
($line ? ('data-line' => $line) : ()), |
98 |
|
($column ? ('data-column' => $column) : ())); |
99 |
|
my $has_location; |
100 |
|
|
101 |
|
## URL |
102 |
|
|
103 |
|
if (defined $opt{url}) { |
104 |
|
$out->url ($opt{url}); |
105 |
|
$has_location = 1; |
106 |
|
} |
107 |
|
|
108 |
|
## Line & column numbers (real output) |
109 |
|
|
110 |
if (defined $line) { |
if (defined $line) { |
111 |
if (defined $column and $column > 0) { |
if (defined $column and $column > 0) { |
112 |
$out->xref ('Line ' . $line, target => 'line-' . $line); |
$out->xref ('Line #', text => $line, target => 'line-' . $line); |
113 |
$out->text (' column ' . $column); |
$out->text (' '); |
114 |
|
$out->nl_text ('column #', text => $column); |
115 |
} else { |
} else { |
116 |
$line = $line - 1 || 1; |
$out->xref ('Line #', text => $line, target => 'line-' . $line); |
|
$out->xref ('Line ' . $line, target => 'line-' . $line); |
|
117 |
} |
} |
118 |
$has_location = 1; |
$has_location = 1; |
119 |
} |
} |
129 |
if (defined $opt{index}) { |
if (defined $opt{index}) { |
130 |
if ($opt{index_has_link}) { |
if ($opt{index_has_link}) { |
131 |
$out->html (' '); |
$out->html (' '); |
132 |
$out->xref ('Index ' . (0+$opt{index}), |
$out->xref ('Index #', text => (0+$opt{index}), |
133 |
target => 'index-' . (0+$opt{index})); |
target => 'index-' . (0+$opt{index})); |
134 |
} else { |
} else { |
135 |
$out->text (' Index ' . (0+$opt{index})); |
$out->html (' '); |
136 |
|
$out->nl_text ('Index #', text => (0+$opt{index})); |
137 |
} |
} |
138 |
$has_location = 1; |
$has_location = 1; |
139 |
} |
} |
187 |
|
|
188 |
## Error message |
## Error message |
189 |
|
|
190 |
$out->text ($error_type_text); |
$out->nl_text ($error_type_text, node => $opt{node}, text => $opt{text}); |
191 |
|
|
192 |
## Additional error description |
## Additional error description |
193 |
|
|