-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #141 Support captions (file paths) for code blocks (javieregu…
…iluz) This PR was merged into the main branch. Discussion ---------- Support captions (file paths) for code blocks Commits ------- b9eec4a Support captions (file paths) for code blocks
- Loading branch information
Showing
6 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
tests/fixtures/expected/blocks/code-blocks/code-caption.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<div translate="no" data-loc="1" class="notranslate codeblock codeblock-length-sm codeblock-php"> | ||
<div class="codeblock-caption">config/routes.php</div> | ||
<div class="codeblock-scroll"> | ||
<pre class="codeblock-lines">1</pre> | ||
<pre class="codeblock-code"> | ||
<code> | ||
<span class="hljs-variable"> | ||
<span class="hljs-variable-other-marker">$</span> | ||
foo</span> | ||
= | ||
<span class="hljs-string">'bar'</span>;</code> | ||
</pre> | ||
</div> | ||
</div> | ||
|
||
<div translate="no" data-loc="1" class="notranslate codeblock codeblock-length-sm codeblock-php hide"> | ||
<div class="codeblock-caption">config/routes.php</div> | ||
<div class="codeblock-scroll"> | ||
<pre class="codeblock-lines">1</pre> | ||
<pre class="codeblock-code"> | ||
<code> | ||
<span class="hljs-variable"> | ||
<span class="hljs-variable-other-marker">$</span> | ||
foo</span> | ||
= | ||
<span class="hljs-string">'bar'</span>;</code> | ||
</pre> | ||
</div> | ||
</div> | ||
|
||
<div translate="no" data-loc="3" class="notranslate codeblock codeblock-length-sm codeblock-diff"> | ||
<div class="codeblock-scroll"> | ||
<pre class="codeblock-lines">1 | ||
2 | ||
3</pre> | ||
<pre class="codeblock-code"> | ||
<code> | ||
<span class="hljs-comment">--- a/src/Controller/DefaultController.php</span> | ||
<span class="hljs-comment">+++ b/src/Controller/DefaultController.php</span> | ||
<span class="hljs-meta">@@ -2,7 +2,9 @@</span> | ||
</code> | ||
</pre> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
.. code-block:: php | ||
:caption: config/routes.php | ||
$foo = 'bar'; | ||
.. code-block:: php | ||
:caption: config/routes.php | ||
:class: hide | ||
$foo = 'bar'; | ||
.. code-block:: diff | ||
:caption: patch_file | ||
:emphasize-lines: 1,2 | ||
--- a/src/Controller/DefaultController.php | ||
+++ b/src/Controller/DefaultController.php | ||
@@ -2,7 +2,9 @@ |