Skip to content

Commit d3c33ae

Browse files
jakejackson1claude
andcommitted
Say what the left-out content comments mean in fewer words
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent a085b94 commit d3c33ae

4 files changed

Lines changed: 10 additions & 11 deletions

File tree

‎src/Mpdf.php‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2185,9 +2185,8 @@ function SetVisibility($v)
21852185
}
21862186

21872187
/**
2188-
* Whether content with this visibility is left out of the document: under PDFAauto and PDFXauto, screen-only
2189-
* content, and hidden content where optional content is not allowed. The archive or print file stands for the
2190-
* printed document.
2188+
* Whether content with this visibility is left out: under PDFAauto and PDFXauto, what would not print is dropped,
2189+
* which is screen-only content, and hidden content where optional content is not allowed
21912190
*
21922191
* @param string $v
21932192
*
@@ -2219,8 +2218,8 @@ private function visibilityBegins($v)
22192218
}
22202219

22212220
/**
2222-
* Write the font, colours, line width and spacing the renderer believes are set, since any that were set in content
2223-
* left out were left out with it
2221+
* Write the font, colours, line width and spacing in force again, since any set inside left-out content went
2222+
* with it
22242223
*/
22252224
private function resumeAfterDroppedContent()
22262225
{

‎src/Tag/Tag.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ protected function getAlign($property)
121121
}
122122

123123
/**
124-
* An object's attributes with the visibility of the span it is in. Printing reads a span's visibility from the
125-
* inline properties a text buffer entry carries, which an object put straight into the buffer has none of.
124+
* An object's attributes with the visibility of the span it is in. Printing reads a span's visibility from its
125+
* text buffer entry, and an object put straight into the buffer has none.
126126
*
127127
* @param mixed[] $objattr
128128
*

‎src/Writer/PageWriter.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function writePages() // _putpages
8282
}
8383
}
8484

85-
// Remove the content that visibility leaves out of a PDF/A or PDF/X document, then any marker left unpaired
85+
// Remove content left out of a PDF/A or PDF/X document, then any unpaired marker
8686
if (strpos($thispage, '___DROPPED___') !== false) {
8787
$thispage = preg_replace('/___DROPPED___START' . $this->mpdf->uniqstr . '.*?___DROPPED___END' . $this->mpdf->uniqstr . '/s', '', $thispage);
8888
$thispage = str_replace(['___DROPPED___START' . $this->mpdf->uniqstr, '___DROPPED___END' . $this->mpdf->uniqstr], '', $thispage);

‎tests/Mpdf/AutoVisibilityTest.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class AutoVisibilityTest extends \Yoast\PHPUnitPolyfills\TestCases\TestCase
1717
const PDFA1_AUTO = ['PDFA' => true, 'PDFAauto' => true, 'PDFAversion' => '1-B'];
1818

1919
/**
20-
* A block and a span with each visibility are in the page content or not, and the text around them is
20+
* A block and a span of each visibility are drawn or left out, and the text around them is always drawn
2121
*
2222
* @dataProvider autoVisibilities
2323
*/
@@ -128,7 +128,7 @@ public function testLeftOutContentRegistersNothing($tag, $visibility, $registere
128128
}
129129

130130
/**
131-
* A block and a span, drawn and left out, with how many of each thing they register
131+
* A block and a span, drawn and left out, with how many of each entry they register
132132
*
133133
* @return mixed[][]
134134
*/
@@ -168,7 +168,7 @@ public function testLeftOutContentAcrossPageBreaks()
168168
}
169169

170170
/**
171-
* A line drawn after content left out has the colour and width set for it, although the content left out set
171+
* A line drawn after left-out content gets the colour and width set for it, even though the left-out content set
172172
* the same ones last
173173
*/
174174
public function testDrawingResumesWithTheStateSet()

0 commit comments

Comments
 (0)