SyntaxHighlighter Evolved - Version 3.5.2

Version Description

Download this release

Release Info

Developer gikaragia
Plugin Icon wp plugin SyntaxHighlighter Evolved
Version 3.5.2
Comparing to
See all releases

Code changes from version 3.5.1 to 3.5.2

Files changed (3) hide show
  1. dist/blocks.build.js +1 -1
  2. readme.txt +6 -2
  3. syntaxhighlighter.php +2 -3
dist/blocks.build.js CHANGED
@@ -1 +1 @@
1
- !function(e){function t(r){if(n[r])return n[r].exports;var l=n[r]={i:r,l:!1,exports:{}};return e[r].call(l.exports,l,l.exports,t),l.l=!0,l.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),l=(n.n(r),n(2)),a=(n.n(l),n(3)),i=(n.n(a),n(4));n.n(i);Object(l.registerBlockType)("syntaxhighlighter/code",{title:Object(r.__)("SyntaxHighlighter Code","syntaxhighlighter"),description:Object(r.__)("Adds syntax highlighting to source code (front end only).","syntaxhighlighter"),icon:"editor-code",category:"formatting",keywords:[Object(r.__)("Source","syntaxhighlighter"),Object(r.__)("Program","syntaxhighlighter"),Object(r.__)("Develop","syntaxhighlighter")],attributes:{content:{type:"string",source:"text",selector:"pre"},language:{type:"string",default:syntaxHighlighterData.settings.language.default},lineNumbers:{type:"boolean",default:syntaxHighlighterData.settings.lineNumbers.default},firstLineNumber:{type:"string",default:syntaxHighlighterData.settings.firstLineNumber.default},highlightLines:{type:"string"},wrapLines:{type:"boolean",default:syntaxHighlighterData.settings.wrapLines.default},makeURLsClickable:{type:"boolean",default:syntaxHighlighterData.settings.makeURLsClickable.default}},supports:{html:!1},transforms:{from:[{type:"enter",regExp:/^```$/,transform:function(){return Object(l.createBlock)("syntaxhighlighter/code")}},{type:"raw",isMatch:function(e){return"PRE"===e.nodeName&&1===e.children.length&&"CODE"===e.firstChild.nodeName},schema:{pre:{children:{code:{children:{"#text":{}}}}}}}]},edit:function(e){var t=e.attributes,n=e.setAttributes,l=e.className,s=t.content,o=t.language,h=t.lineNumbers,g=t.firstLineNumber,c=t.highlightLines,u=t.wrapLines,p=t.makeURLsClickable,m=[];if(syntaxHighlighterData.settings.language.supported){var b=[];for(var d in syntaxHighlighterData.brushes)b.push({label:syntaxHighlighterData.brushes[d],value:d});m.push(wp.element.createElement(a.PanelRow,null,wp.element.createElement(a.SelectControl,{label:Object(r.__)("Code Language","syntaxhighlighter"),value:o,options:b,onChange:function(e){return n({language:e})}})))}return syntaxHighlighterData.settings.lineNumbers.supported&&m.push(wp.element.createElement(a.PanelRow,null,wp.element.createElement(a.ToggleControl,{label:Object(r.__)("Show Line Numbers","syntaxhighlighter"),checked:h,onChange:function(e){return n({lineNumbers:e})}}))),h&&syntaxHighlighterData.settings.firstLineNumber.supported&&m.push(wp.element.createElement(a.PanelRow,null,wp.element.createElement(a.TextControl,{label:Object(r.__)("First Line Number","syntaxhighlighter"),type:"number",value:g,onChange:function(e){return n({firstLineNumber:e})},min:1,max:1e5}))),syntaxHighlighterData.settings.highlightLines.supported&&m.push(wp.element.createElement(a.TextControl,{label:Object(r.__)("Highlight Lines","syntaxhighlighter"),value:c,help:Object(r.__)("A comma-separated list of line numbers to highlight. Can also be a range. Example: 1,5,10-20","syntaxhighlighter"),onChange:function(e){return n({highlightLines:e})}})),syntaxHighlighterData.settings.wrapLines.supported&&m.push(wp.element.createElement(a.PanelRow,null,wp.element.createElement(a.ToggleControl,{label:Object(r.__)("Wrap Long Lines","syntaxhighlighter"),checked:u,onChange:function(e){return n({wrapLines:e})}}))),syntaxHighlighterData.settings.makeURLsClickable.supported&&m.push(wp.element.createElement(a.PanelRow,null,wp.element.createElement(a.ToggleControl,{label:Object(r.__)("Make URLs Clickable","syntaxhighlighter"),checked:p,onChange:function(e){return n({makeURLsClickable:e})}}))),[wp.element.createElement(i.InspectorControls,{key:"syntaxHighlighterInspectorControls"},wp.element.createElement(a.PanelBody,{title:Object(r.__)("Settings","syntaxhighlighter")},m)),wp.element.createElement("div",{className:l+" wp-block-code"},wp.element.createElement(i.PlainText,{value:s,onChange:function(e){return n({content:e})},placeholder:Object(r.__)("Tip: To the right, choose a code language from the block settings.","syntaxhighlighter"),"aria-label":Object(r.__)("SyntaxHighlighter Code","syntaxhighlighter")}))]},save:function(e){var t=e.attributes,n=t.content;return wp.element.createElement("pre",null,n)}})},function(e,t){e.exports=wp.i18n},function(e,t){e.exports=wp.blocks},function(e,t){e.exports=wp.components},function(e,t){e.exports=wp.editor}]);
1
+ !function(e){function t(r){if(n[r])return n[r].exports;var l=n[r]={i:r,l:!1,exports:{}};return e[r].call(l.exports,l,l.exports,t),l.l=!0,l.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),l=(n.n(r),n(2)),a=(n.n(l),n(3)),i=(n.n(a),n(4));n.n(i);Object(l.registerBlockType)("syntaxhighlighter/code",{title:Object(r.__)("SyntaxHighlighter Code","syntaxhighlighter"),description:Object(r.__)("Adds syntax highlighting to source code (front end only).","syntaxhighlighter"),icon:"editor-code",category:"formatting",keywords:[Object(r.__)("Source","syntaxhighlighter"),Object(r.__)("Program","syntaxhighlighter"),Object(r.__)("Develop","syntaxhighlighter")],attributes:{content:{type:"string",source:"text",selector:"pre"},language:{type:"string",default:syntaxHighlighterData.settings.language.default},lineNumbers:{type:"boolean",default:syntaxHighlighterData.settings.lineNumbers.default},firstLineNumber:{type:"string",default:syntaxHighlighterData.settings.firstLineNumber.default},highlightLines:{type:"string"},wrapLines:{type:"boolean",default:syntaxHighlighterData.settings.wrapLines.default},makeURLsClickable:{type:"boolean",default:syntaxHighlighterData.settings.makeURLsClickable.default}},supports:{html:!1},transforms:{from:[{type:"enter",regExp:/^```$/,transform:function(){return Object(l.createBlock)("syntaxhighlighter/code")}},{type:"raw",isMatch:function(e){return"PRE"===e.nodeName&&1===e.children.length&&"CODE"===e.firstChild.nodeName},schema:{pre:{children:{code:{children:{"#text":{}}}}}}},{type:"block",blocks:["core/code"],transform:function(e){var t=e.content;return Object(l.createBlock)("syntaxhighlighter/code",{content:t})}}],to:[{type:"block",blocks:["core/code"],transform:function(e){var t=e.content;return Object(l.createBlock)("core/code",{content:t})}}]},edit:function(e){var t=e.attributes,n=e.setAttributes,l=e.className,o=t.content,s=t.language,h=t.lineNumbers,g=t.firstLineNumber,c=t.highlightLines,u=t.wrapLines,p=t.makeURLsClickable,m=[];if(syntaxHighlighterData.settings.language.supported){var b=[];for(var d in syntaxHighlighterData.brushes)b.push({label:syntaxHighlighterData.brushes[d],value:d});m.push(wp.element.createElement(a.PanelRow,null,wp.element.createElement(a.SelectControl,{label:Object(r.__)("Code Language","syntaxhighlighter"),value:s,options:b,onChange:function(e){return n({language:e})}})))}return syntaxHighlighterData.settings.lineNumbers.supported&&m.push(wp.element.createElement(a.PanelRow,null,wp.element.createElement(a.ToggleControl,{label:Object(r.__)("Show Line Numbers","syntaxhighlighter"),checked:h,onChange:function(e){return n({lineNumbers:e})}}))),h&&syntaxHighlighterData.settings.firstLineNumber.supported&&m.push(wp.element.createElement(a.PanelRow,null,wp.element.createElement(a.TextControl,{label:Object(r.__)("First Line Number","syntaxhighlighter"),type:"number",value:g,onChange:function(e){return n({firstLineNumber:e})},min:1,max:1e5}))),syntaxHighlighterData.settings.highlightLines.supported&&m.push(wp.element.createElement(a.TextControl,{label:Object(r.__)("Highlight Lines","syntaxhighlighter"),value:c,help:Object(r.__)("A comma-separated list of line numbers to highlight. Can also be a range. Example: 1,5,10-20","syntaxhighlighter"),onChange:function(e){return n({highlightLines:e})}})),syntaxHighlighterData.settings.wrapLines.supported&&m.push(wp.element.createElement(a.PanelRow,null,wp.element.createElement(a.ToggleControl,{label:Object(r.__)("Wrap Long Lines","syntaxhighlighter"),checked:u,onChange:function(e){return n({wrapLines:e})}}))),syntaxHighlighterData.settings.makeURLsClickable.supported&&m.push(wp.element.createElement(a.PanelRow,null,wp.element.createElement(a.ToggleControl,{label:Object(r.__)("Make URLs Clickable","syntaxhighlighter"),checked:p,onChange:function(e){return n({makeURLsClickable:e})}}))),[wp.element.createElement(i.InspectorControls,{key:"syntaxHighlighterInspectorControls"},wp.element.createElement(a.PanelBody,{title:Object(r.__)("Settings","syntaxhighlighter")},m)),wp.element.createElement("div",{className:l+" wp-block-code"},wp.element.createElement(i.PlainText,{value:o,onChange:function(e){return n({content:e})},placeholder:Object(r.__)("Tip: To the right, choose a code language from the block settings.","syntaxhighlighter"),"aria-label":Object(r.__)("SyntaxHighlighter Code","syntaxhighlighter")}))]},save:function(e){var t=e.attributes,n=t.content;return wp.element.createElement("pre",null,n)}})},function(e,t){e.exports=wp.i18n},function(e,t){e.exports=wp.blocks},function(e,t){e.exports=wp.components},function(e,t){e.exports=wp.editor}]);
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: Viper007Bond, automattic, donncha
3
  Donate link: https://alex.blog/2019/03/13/in-memory-of-alex-donation-link-update/
4
  Tags: code, sourcecode, block, php, xhtml, html, css, WordPress.com
5
  Requires at least: 4.2.3
6
- Tested up to: 5.2.3
7
- Stable tag: 3.5.1
8
 
9
  Easily post syntax-highlighted code to your site without having to modify the code at all. As seen on WordPress.com.
10
 
@@ -40,6 +40,10 @@ Try excluding this plugin's Javascript from any performance optimizations your s
40
 
41
  == ChangeLog ==
42
 
 
 
 
 
43
  = Version 3.5.1 =
44
 
45
  * Fix stored XSS by tightening up the autolinking code so it only does http/https text. #1
3
  Donate link: https://alex.blog/2019/03/13/in-memory-of-alex-donation-link-update/
4
  Tags: code, sourcecode, block, php, xhtml, html, css, WordPress.com
5
  Requires at least: 4.2.3
6
+ Tested up to: 5.3.2
7
+ Stable tag: 3.5.2
8
 
9
  Easily post syntax-highlighted code to your site without having to modify the code at all. As seen on WordPress.com.
10
 
40
 
41
  == ChangeLog ==
42
 
43
+ = Version 3.5.2 =
44
+
45
+ * Update plugin dependencies to the latest version.
46
+
47
  = Version 3.5.1 =
48
 
49
  * Fix stored XSS by tightening up the autolinking code so it only does http/https text. #1
syntaxhighlighter.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  Plugin Name: SyntaxHighlighter Evolved
6
  Plugin URI: https://alex.blog/wordpress-plugins/syntaxhighlighter/
7
- Version: 3.5.1
8
  Description: Easily post syntax-highlighted code to your site without having to modify the code at all. Uses Alex Gorbatchev's <a href="http://alexgorbatchev.com/SyntaxHighlighter/">SyntaxHighlighter</a>. Includes a new editor block.
9
  Author: Alex Mills (Viper007Bond)
10
  Author URI: https://alex.blog/
@@ -16,7 +16,7 @@ License URI: https://www.gnu.org/licenses/gpl-2.0.html
16
 
17
  class SyntaxHighlighter {
18
  // All of these variables are private. Filters are provided for things that can be modified.
19
- var $pluginver = '3.5.0'; // Plugin version
20
  var $agshver = false; // Alex Gorbatchev's SyntaxHighlighter version (dynamically set below due to v2 vs v3)
21
  var $shfolder = false; // Controls what subfolder to load SyntaxHighlighter from (v2 or v3)
22
  var $settings = array(); // Contains the user's settings
@@ -1324,7 +1324,6 @@ class SyntaxHighlighter {
1324
  </script>
1325
 
1326
  <div class="wrap">
1327
- <?php if ( function_exists('screen_icon') ) screen_icon(); ?>
1328
  <h2><?php _e( 'SyntaxHighlighter Settings', 'syntaxhighlighter' ); ?></h2>
1329
 
1330
  <form method="post" action="options.php">
4
 
5
  Plugin Name: SyntaxHighlighter Evolved
6
  Plugin URI: https://alex.blog/wordpress-plugins/syntaxhighlighter/
7
+ Version: 3.5.2
8
  Description: Easily post syntax-highlighted code to your site without having to modify the code at all. Uses Alex Gorbatchev's <a href="http://alexgorbatchev.com/SyntaxHighlighter/">SyntaxHighlighter</a>. Includes a new editor block.
9
  Author: Alex Mills (Viper007Bond)
10
  Author URI: https://alex.blog/
16
 
17
  class SyntaxHighlighter {
18
  // All of these variables are private. Filters are provided for things that can be modified.
19
+ var $pluginver = '3.5.2'; // Plugin version
20
  var $agshver = false; // Alex Gorbatchev's SyntaxHighlighter version (dynamically set below due to v2 vs v3)
21
  var $shfolder = false; // Controls what subfolder to load SyntaxHighlighter from (v2 or v3)
22
  var $settings = array(); // Contains the user's settings
1324
  </script>
1325
 
1326
  <div class="wrap">
 
1327
  <h2><?php _e( 'SyntaxHighlighter Settings', 'syntaxhighlighter' ); ?></h2>
1328
 
1329
  <form method="post" action="options.php">