fix: only generate conflicting text decoration style error in PDF/UA-1

This commit is contained in:
Tobias Schmitz 2025-08-05 10:54:08 +02:00
parent e5fcc3bf5e
commit 3bcfe54002
No known key found for this signature in database
2 changed files with 7 additions and 1 deletions

View File

@ -223,7 +223,7 @@ impl TextAttrs {
let deco = TextDeco { kind, stroke };
// TODO: can overlapping tags break this?
if self.decos.iter().any(|(_, d)| d.kind != deco.kind) {
if options.is_pdf_ua() && self.decos.iter().any(|(_, d)| d.kind != deco.kind) {
let validator = options.standards.config.validator();
let validator = validator.as_str();
bail!(

View File

@ -24,3 +24,9 @@ blue underlined text
#underline[underlined]\
#overline[overlined]\
#strike[striked]\
--- deco-tags-multiple-styles pdftags ---
#show: underline
// Error: 2-16 PDF/UA1 error: cannot combine underline, overline, and or strike
#show: overline
text with a bunch of lines