170 |
|
|
171 |
if (defined $opt{value}) { |
if (defined $opt{value}) { |
172 |
$out->html (' '); |
$out->html (' '); |
173 |
$out->code ($opt{value}); |
if (defined $opt{pos_start}) { |
174 |
|
$out->start_tag ('code'); |
175 |
|
$out->text (substr $opt{value}, 0, $opt{pos_start}); |
176 |
|
$out->start_tag ('mark'); |
177 |
|
$out->text (substr $opt{value}, $opt{pos_start}, |
178 |
|
$opt{pos_end} - $opt{pos_start} + 1); |
179 |
|
$out->end_tag ('mark'); |
180 |
|
$out->text (substr $opt{value}, $opt{pos_end} + 1); |
181 |
|
$out->end_tag ('code'); |
182 |
|
} elsif ($opt{value_mark_end}) { |
183 |
|
$out->start_tag ('code'); |
184 |
|
$out->text ($opt{value}); |
185 |
|
$out->start_tag ('mark'); |
186 |
|
$out->end_tag ('mark'); |
187 |
|
$out->end_tag ('code'); |
188 |
|
} elsif (defined $opt{value_mark}) { |
189 |
|
$out->start_tag ('code'); |
190 |
|
for (split /($opt{value_mark})/, $opt{value}) { |
191 |
|
if (/$opt{value_mark}/) { |
192 |
|
$out->start_tag ('mark'); |
193 |
|
$out->text ($_); |
194 |
|
$out->end_tag ('mark'); |
195 |
|
} else { |
196 |
|
$out->text ($_); |
197 |
|
} |
198 |
|
} |
199 |
|
$out->end_tag ('code'); |
200 |
|
} else { |
201 |
|
$out->code ($opt{value}); |
202 |
|
} |
203 |
$has_location = 1; |
$has_location = 1; |
204 |
} |
} |
205 |
|
|