Skip to content

Commit

Permalink
BBCodes: updated hljs-loader
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshyPHP committed May 31, 2023
1 parent e824143 commit 052cde4
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 24 deletions.
10 changes: 5 additions & 5 deletions docs/Plugins/BBCodes/Add_from_the_repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,14 @@ array (
github
</xsl:attribute>
</xsl:if>
<xsl:if test="'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.7.0/build/' != 'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.7.0/build/'">
<xsl:if test="'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.8.0/build/' != 'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.8.0/build/'">
<xsl:attribute name="data-hljs-url">
https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.7.0/build/
https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.8.0/build/
</xsl:attribute>
</xsl:if>
<xsl:attribute name="data-s9e-livepreview-onrender">if(window['hljsLoader'])this.parentNode.removeChild(this)</xsl:attribute>
<xsl:attribute name="integrity">sha384-ryUuFF+lg0ZHUA7DaXhvSekelOyHvqE2+5VtldjgFG+Y99aBpL8SNXEPubG6UTNv</xsl:attribute>
<xsl:attribute name="src">https://cdn.jsdelivr.net/gh/s9e/hljs-loader@1.0.32/loader.min.js</xsl:attribute>
<xsl:attribute name="integrity">sha384-fSWmbgQwbzLXpKFwOj6DlXOstUp9/gRcSSNLI50wWQYg7XIihuBcYUTG/GR7ocjz</xsl:attribute>
<xsl:attribute name="src">https://cdn.jsdelivr.net/gh/s9e/hljs-loader@1.0.33/loader.min.js</xsl:attribute>
</script>
</pre>
```
Expand All @@ -141,7 +141,7 @@ array (
</tr>
<tr>
<td><code>url</code></td>
<td>https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.7.0/build/</td>
<td>https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.8.0/build/</td>
<td>highlight.js CDN URL</td>
</tr>
</table>
Expand Down
4 changes: 2 additions & 2 deletions docs/testdox.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3780,7 +3780,7 @@ Configurable (s9e\TextFormatter\Tests\Configurator\Traits\Configurable)
[x] __get() throws a RuntimeException if the property does not exist
[x] __get($k) returns null if the property is null
[x] __set('foo', 'bar') calls setFoo('bar') if it exists
[x] __set() can create new properties
[ ] __set() can create new properties
[x] __set() can replace an instance of Foo with another instance of Foo
[x] __set() can replace an instance of Foo with an instance of FooPlus, which extends Foo
[x] __set() throws an exception if an instance of Foo would be replaced by an instance of Bar
Expand Down Expand Up @@ -7866,7 +7866,7 @@ Unformatted (s9e\TextFormatter\Tests\Renderers\Unformatted)
XSLT (s9e\TextFormatter\Tests\Renderers\XSLT)
[x] Is serializable
[x] Does not serialize the XSLTProcessor instance
[x] Preserves other properties during serialization
[ ] Preserves other properties during serialization
[x] setParameter() accepts values that contain both types of quotes but replaces ASCII character " with Unicode character 0xFF02 because of https://bugs.php.net/64137
[x] Does not output </embed> end tags
[x] Does not improperly replace single quotes inside attribute values
Expand Down
6 changes: 3 additions & 3 deletions src/Bundles/Forum.php

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/Bundles/Forum/Renderer.php

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/Plugins/BBCodes/Configurator/repository.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@
<var name='style'>github</var>
<![CDATA[</xsl:attribute>
</xsl:if>
<xsl:if test="'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.7.0/build/' != ']]><var name='url' description='highlight.js CDN URL'>https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.7.0/build/</var><![CDATA['">
<xsl:if test="'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.8.0/build/' != ']]><var name='url' description='highlight.js CDN URL'>https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.8.0/build/</var><![CDATA['">
<xsl:attribute name="data-hljs-url">]]>
<var name='url'>https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.7.0/build/</var>
<var name='url'>https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.8.0/build/</var>
<![CDATA[</xsl:attribute>
</xsl:if>
<xsl:attribute name="data-s9e-livepreview-onrender">if(window['hljsLoader'])this.parentNode.removeChild(this)</xsl:attribute>
<xsl:attribute name="integrity">sha384-ryUuFF+lg0ZHUA7DaXhvSekelOyHvqE2+5VtldjgFG+Y99aBpL8SNXEPubG6UTNv</xsl:attribute>
<xsl:attribute name="src">https://cdn.jsdelivr.net/gh/s9e/hljs-loader@1.0.32/loader.min.js</xsl:attribute>
<xsl:attribute name="integrity">sha384-fSWmbgQwbzLXpKFwOj6DlXOstUp9/gRcSSNLI50wWQYg7XIihuBcYUTG/GR7ocjz</xsl:attribute>
<xsl:attribute name="src">https://cdn.jsdelivr.net/gh/s9e/hljs-loader@1.0.33/loader.min.js</xsl:attribute>
</script>
</pre>
]]></template>
Expand Down
2 changes: 1 addition & 1 deletion tests/Bundles/data/Forum/016.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<pre><code>echo 'Hello world';</code><script async="" crossorigin="anonymous" data-hljs-style="github" integrity="sha384-ryUuFF+lg0ZHUA7DaXhvSekelOyHvqE2+5VtldjgFG+Y99aBpL8SNXEPubG6UTNv" src="https://cdn.jsdelivr.net/gh/s9e/hljs-loader@1.0.32/loader.min.js"></script></pre>
<pre><code>echo 'Hello world';</code><script async="" crossorigin="anonymous" data-hljs-style="github" integrity="sha384-fSWmbgQwbzLXpKFwOj6DlXOstUp9/gRcSSNLI50wWQYg7XIihuBcYUTG/GR7ocjz" src="https://cdn.jsdelivr.net/gh/s9e/hljs-loader@1.0.33/loader.min.js"></script></pre>

Text
4 changes: 2 additions & 2 deletions tests/Bundles/data/Forum/017.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<pre><code>echo 'Hello world';</code><script async="" crossorigin="anonymous" data-hljs-style="github" integrity="sha384-ryUuFF+lg0ZHUA7DaXhvSekelOyHvqE2+5VtldjgFG+Y99aBpL8SNXEPubG6UTNv" src="https://cdn.jsdelivr.net/gh/s9e/hljs-loader@1.0.32/loader.min.js"></script></pre>
<pre><code>echo 'Hello world';</code><script async="" crossorigin="anonymous" data-hljs-style="github" integrity="sha384-fSWmbgQwbzLXpKFwOj6DlXOstUp9/gRcSSNLI50wWQYg7XIihuBcYUTG/GR7ocjz" src="https://cdn.jsdelivr.net/gh/s9e/hljs-loader@1.0.33/loader.min.js"></script></pre>

Text<br>

<pre><code class="language-php">echo 'Hello world';</code><script async="" crossorigin="anonymous" data-hljs-style="github" integrity="sha384-ryUuFF+lg0ZHUA7DaXhvSekelOyHvqE2+5VtldjgFG+Y99aBpL8SNXEPubG6UTNv" src="https://cdn.jsdelivr.net/gh/s9e/hljs-loader@1.0.32/loader.min.js"></script></pre>
<pre><code class="language-php">echo 'Hello world';</code><script async="" crossorigin="anonymous" data-hljs-style="github" integrity="sha384-fSWmbgQwbzLXpKFwOj6DlXOstUp9/gRcSSNLI50wWQYg7XIihuBcYUTG/GR7ocjz" src="https://cdn.jsdelivr.net/gh/s9e/hljs-loader@1.0.33/loader.min.js"></script></pre>
2 changes: 1 addition & 1 deletion tests/Bundles/data/Forum/026.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<pre><code>line 1
line 2
</code><script async="" crossorigin="anonymous" data-hljs-style="github" integrity="sha384-ryUuFF+lg0ZHUA7DaXhvSekelOyHvqE2+5VtldjgFG+Y99aBpL8SNXEPubG6UTNv" src="https://cdn.jsdelivr.net/gh/s9e/hljs-loader@1.0.32/loader.min.js"></script></pre>
</code><script async="" crossorigin="anonymous" data-hljs-style="github" integrity="sha384-fSWmbgQwbzLXpKFwOj6DlXOstUp9/gRcSSNLI50wWQYg7XIihuBcYUTG/GR7ocjz" src="https://cdn.jsdelivr.net/gh/s9e/hljs-loader@1.0.33/loader.min.js"></script></pre>
8 changes: 4 additions & 4 deletions tests/Plugins/BBCodes/BBCodesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,15 @@ public static function getPredefinedBBCodesTests()
],
[
'[code]echo "Hello world";[/code]',
'<pre><code>echo "Hello world";</code><script async="" crossorigin="anonymous" data-hljs-style="github" integrity="sha384-ryUuFF+lg0ZHUA7DaXhvSekelOyHvqE2+5VtldjgFG+Y99aBpL8SNXEPubG6UTNv" src="https://cdn.jsdelivr.net/gh/s9e/hljs-loader@1.0.32/loader.min.js"></script></pre>',
'<pre><code>echo "Hello world";</code><script async="" crossorigin="anonymous" data-hljs-style="github" integrity="sha384-fSWmbgQwbzLXpKFwOj6DlXOstUp9/gRcSSNLI50wWQYg7XIihuBcYUTG/GR7ocjz" src="https://cdn.jsdelivr.net/gh/s9e/hljs-loader@1.0.33/loader.min.js"></script></pre>',
],
[
'[code=html]<b>Hello world</b>[/code]',
'<pre><code class="language-html">&lt;b&gt;Hello world&lt;/b&gt;</code><script async="" crossorigin="anonymous" data-hljs-style="github" integrity="sha384-ryUuFF+lg0ZHUA7DaXhvSekelOyHvqE2+5VtldjgFG+Y99aBpL8SNXEPubG6UTNv" src="https://cdn.jsdelivr.net/gh/s9e/hljs-loader@1.0.32/loader.min.js"></script></pre>',
'<pre><code class="language-html">&lt;b&gt;Hello world&lt;/b&gt;</code><script async="" crossorigin="anonymous" data-hljs-style="github" integrity="sha384-fSWmbgQwbzLXpKFwOj6DlXOstUp9/gRcSSNLI50wWQYg7XIihuBcYUTG/GR7ocjz" src="https://cdn.jsdelivr.net/gh/s9e/hljs-loader@1.0.33/loader.min.js"></script></pre>',
],
[
'[code]echo "Hello world";[/code]',
'<pre><code>echo "Hello world";</code><script async="" crossorigin="anonymous" data-hljs-style="none" data-hljs-url="/path/to/highlight.js/" integrity="sha384-ryUuFF+lg0ZHUA7DaXhvSekelOyHvqE2+5VtldjgFG+Y99aBpL8SNXEPubG6UTNv" src="https://cdn.jsdelivr.net/gh/s9e/hljs-loader@1.0.32/loader.min.js"></script></pre>',
'<pre><code>echo "Hello world";</code><script async="" crossorigin="anonymous" data-hljs-style="none" data-hljs-url="/path/to/highlight.js/" integrity="sha384-fSWmbgQwbzLXpKFwOj6DlXOstUp9/gRcSSNLI50wWQYg7XIihuBcYUTG/GR7ocjz" src="https://cdn.jsdelivr.net/gh/s9e/hljs-loader@1.0.33/loader.min.js"></script></pre>',
function ($configurator)
{
$configurator->BBCodes->addFromRepository('CODE', 'default', [
Expand All @@ -181,7 +181,7 @@ function ($configurator)
],
[
'[code]echo "Hello world";[/code]',
'<pre><code>echo "Hello world";</code><script async="" crossorigin="anonymous" integrity="sha384-ryUuFF+lg0ZHUA7DaXhvSekelOyHvqE2+5VtldjgFG+Y99aBpL8SNXEPubG6UTNv" src="https://cdn.jsdelivr.net/gh/s9e/hljs-loader@1.0.32/loader.min.js"></script></pre>',
'<pre><code>echo "Hello world";</code><script async="" crossorigin="anonymous" integrity="sha384-fSWmbgQwbzLXpKFwOj6DlXOstUp9/gRcSSNLI50wWQYg7XIihuBcYUTG/GR7ocjz" src="https://cdn.jsdelivr.net/gh/s9e/hljs-loader@1.0.33/loader.min.js"></script></pre>',
function ($configurator)
{
$configurator->BBCodes->addFromRepository('CODE', 'default', [
Expand Down

0 comments on commit 052cde4

Please sign in to comment.