Skip to content

Commit

Permalink
wrapper class given for code_block
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajat Singla committed Jun 12, 2024
1 parent d0f21e9 commit 46617d2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/data/html/code_block.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div id="b-NzgT2MAhuSTnpFyo-E4"><pre><code data-lang="python"># Python Program to find the L.C.M. of two input number
<div class="code-block-wrapper" id="b-NzgT2MAhuSTnpFyo-E4"><pre><code data-lang="python"># Python Program to find the L.C.M. of two input number

def compute_lcm(x, y):

Expand All @@ -19,7 +19,7 @@
num1 = 54
num2 = 24

print(&quot;The L.C.M. is&quot;, compute_lcm(num1, num2))</code></pre></div><div><pre><code># Python Program to find the L.C.M. of two input number
print(&quot;The L.C.M. is&quot;, compute_lcm(num1, num2))</code></pre></div><div class="code-block-wrapper"><pre><code># Python Program to find the L.C.M. of two input number

def compute_lcm(x, y):

Expand Down
2 changes: 1 addition & 1 deletion tiptapy/templates/codeBlock.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{%- if node.content -%}
{%- set text = node.content[0].text -%}
{%- if text -%}
<div{{ extract_tag_attrs(node) }}><pre>
<div class="code-block-wrapper" {{ extract_tag_attrs(node) }}><pre>
{%- if language -%}
<code data-lang="{{language}}">{{text}}</code>
{%- else -%}
Expand Down
2 changes: 1 addition & 1 deletion tiptapy/templates/code_block.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{%- if node.content -%}
{%- set text = node.content[0].text -%}
{%- if text -%}
<div{{ extract_tag_attrs(node) }}><pre>
<div class="code-block-wrapper"{{ extract_tag_attrs(node) }}><pre>
{%- if language -%}
<code data-lang="{{language}}">{{text}}</code>
{%- else -%}
Expand Down

0 comments on commit 46617d2

Please sign in to comment.