Skip to content

Commit

Permalink
QA
Browse files Browse the repository at this point in the history
  • Loading branch information
brendt committed May 9, 2024
1 parent eaf26c2 commit 5172388
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.3.4

- Add `class="notranslate"` to pre tags to prevent Google Translate from translating code blocks (#114)

## 2.3.3

- Fix blade comments being styled as deletions (#10)
Expand Down
6 changes: 3 additions & 3 deletions tests/CommonMark/CodeBlockRendererTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Foo {}
TXT;

$expected = <<<'TXT'
<pre data-lang="php"><span class="hl-gutter ">10</span> <span class="hl-keyword">class</span> <span class="hl-type">Foo</span> {}</pre>
<pre data-lang="php" class="notranslate"><span class="hl-gutter ">10</span> <span class="hl-keyword">class</span> <span class="hl-type">Foo</span> {}</pre>

TXT;

Expand All @@ -79,7 +79,7 @@ public function test_commonmark_with_pre(): void
TXT;

$expected = <<<'TXT'
<pre data-lang="php" style="color: #212121; background-color: #ffffff;"><span style="color: #D32F2F;">echo</span>;
<pre data-lang="php" class="notranslate" style="color: #212121; background-color: #ffffff;"><span style="color: #D32F2F;">echo</span>;
</pre>

TXT;
Expand All @@ -105,7 +105,7 @@ public function test_commonmark_with_no_language(): void
TXT;

$expected = <<<'TXT'
<pre data-lang="txt">echo;
<pre data-lang="txt" class="notranslate">echo;
</pre>

TXT;
Expand Down

0 comments on commit 5172388

Please sign in to comment.