Skip to content

Commit

Permalink
applied config changes to EditorConfig; fixed #293
Browse files Browse the repository at this point in the history
  • Loading branch information
AndiDittrich committed Aug 3, 2020
1 parent a571838 commit e5592d9
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .wp-skeleton.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"slug": "enlighter",
"name": "Enlighter",
"namespace": "Enlighter",
"version": "4.3.0",
"version": "4.3.1",
"license": "GPL-2.0",
"licenseFile": "LICENSE.txt",
"constants": {},
Expand Down
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Changelog ##

### 4.3.1 ###

* Bugfix: due to changes in the initialization code in `4.3.0` the global config couldn't be retrieved by the editing plugins

### 4.3.0 ###

* Added: EnlighterJS `v3.4.0`
Expand Down
4 changes: 2 additions & 2 deletions Enlighter.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Enlighter - Customizable Syntax Highlighter
Plugin URI: https://enlighterjs.org
Description: all-in-one syntax highlighting solution
Version: 4.3.0
Version: 4.3.1
Author: Andi Dittrich
Author URI: https://andidittrich.com
License: GPL-2.0
Expand All @@ -16,7 +16,7 @@
// Plugin Bootstrap Operation
// AUTO GENERATED CODE - DO NOT EDIT !!!
define('ENLIGHTER_INIT', true);
define('ENLIGHTER_VERSION', '4.3.0');
define('ENLIGHTER_VERSION', '4.3.1');
define('ENLIGHTER_WPSKLTN_VERSION', '0.24.0');
define('ENLIGHTER_PHP_VERSION', '5.6');
define('ENLIGHTER_PLUGIN_TITLE', 'Enlighter - Customizable Syntax Highlighter');
Expand Down
5 changes: 4 additions & 1 deletion modules/editor/EditorConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,15 @@ public function getEditorConfigCode(){

// filtered themes
$themes = apply_filters('enlighter_editor_themes', $this->_themeManager->getThemes());

// retrieve enlighterjs default config
$enlighterjsConfig = $this->_enlighterjs->getConfig();

// create config object
$config = array(
'languages' => $languages,
'themes' => $themes,
'config' => $this->_enlighterjs->getConfig(),
'config' => $enlighterjsConfig['options'],
'tinymce' => array(
'tabIndentation' => $this->_config['tinymce-tabindentation'],
'keyboardShortcuts' => $this->_config['tinymce-keyboardshortcuts']
Expand Down
8 changes: 4 additions & 4 deletions modules/skltn/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public function showUpgradeAvailabilityNotification($currentPluginMetadata, $new
public function showUpgradeMessage(){
// styling
echo '<div class="notice notice-success is-dismissible"><p>';
echo '<strong>Enlighter Plugin Upgrade:</strong> The Plugin has been upgraded to <strong>4.3.0</strong>';
echo '<strong>Enlighter Plugin Upgrade:</strong> The Plugin has been upgraded to <strong>4.3.1</strong>';
echo '</p></div>';
}

Expand Down Expand Up @@ -300,14 +300,14 @@ public static function run($pluginName){
// plugin installed ?
if ($version == '0.0.0'){
// store new version
update_option('enlighter-version', '4.3.0');
update_option('enlighter-version', '4.3.1');

// plugin upgraded ?
}else if (version_compare('4.3.0', $version, '>')){
}else if (version_compare('4.3.1', $version, '>')){
// run upgrade hook
if ($i->_wp_plugin_upgrade($version)){
// store new version
update_option('enlighter-version', '4.3.0');
update_option('enlighter-version', '4.3.1');

// set flag (string!)
update_option('enlighter-upgrade', 'true');
Expand Down
37 changes: 1 addition & 36 deletions views/admin/about/Changelog.html
Original file line number Diff line number Diff line change
@@ -1,38 +1,3 @@
<ul>
<li>Added: EnlighterJS <code>v3.4.0</code></li>
<li>Added: EnlighterJS Theme-Customizer <code>v2.3.0</code></li>
<li>Added: compatibility for <code>async/defer</code> script loading (configuration code is merged with the library) (optional)- feature requested <a href="https://wordpress.org/support/topic/enlighterjs-resources-not-loaded-yet/">on WordPress.org Forums</a></li>
<li>Added: javascript based dynamic-resource-invocation to load the EnlighterJS assets dynamically when needed (client side)</li>
<li>Added: dri compatibility for bbpress and dynamic content (jquery load, jetpack infinity scroll)</li>
<li>Added: keyword <code>k11</code> for annotations</li>
<li>Added: keyword <code>x16</code> for css element selectors</li>
<li>Added: contextual keywords to csharp - thanks to <a href="https://github.com/EnlighterJS/EnlighterJS/pull/112">mabako on GitHub</a></li>
<li>Added: kotlin string template support</li>
<li>Added: <code>r</code> language support (covered by generic ruleset)</li>
<li>Added: MikroTik <code>RouterOS</code> language support (ros/mikrotik/switchos/routeros/mt)</li>
<li>Added: pound style comment support to <code>php</code></li>
<li>Changed: renamed the &quot;raw code&quot; language label to &quot;Plain text&quot;</li>
<li>Changed: EnlighterJS library (js) is loaded via cache file <code>cache/enlighterjs.min.js</code></li>
<li>Changed: js/css cache file generation is bound to <code>enqueue</code> hook (performance)</li>
<li>Changed: <code>wp-skltn</code> library updated to <strong>0.24.0</strong></li>
<li>Changed: for compatibility reasons, the language-shortcodes are disabled by default (this only affects new installations)</li>
<li>Changed: full semantic versioning tag is used to display the plugin version (may used by additional tools) - thanks to <a href="https://github.com/EnlighterJS/Plugin.WordPress/issues/262">roy-bongers on GitHub</a></li>
<li>Changed: theme cache is only reloaded on Enlighter settings pages (performance) - thanks to <a href="https://wordpress.org/support/topic/problem-with-_transient_enlighter_userthemes-option/">gdragon on Wordpress forums</a></li>
<li>Changed: EnlighterJS::getConfig has been changed to multidimension object to allow additional payloads (this also affects the initialization code)</li>
<li>Changed: css selector fragment highlighting is limited to the selector itself</li>
<li>Changed: enhanced css unit parsing</li>
<li>Changed: <code>java</code>, <code>scala</code>, <code>cpp</code> annotation token changed to <code>k11</code></li>
<li>Changed: added token <code>k11</code> to themes</li>
<li>Changed: moved generic highlighting rules to <code>lang/rulesets/generic</code></li>
<li>Changed: <code>ampersandCleanup</code> is performed after html escape sequences to eliminate issues related to double unquoting #109</li>
<li>Changed: toggle raw code label to &quot;Plain text&quot;</li>
<li>Changed: allowed utf8 characters in <code>php</code> variable and function names (side effect of the php parser)</li>
<li>Removed: <code>EnlighterJS::dequeue</code> function (deprecated due to new DRI implementation)</li>
<li>Bugfix: vhdl single bit highlighting collided with attribute syntax - thanks to <a href="https://github.com/EnlighterJS/EnlighterJS/issues/106">tyriun on GitHub</a></li>
<li>Bugfix: css classnames/ids with hyphens were not recognized</li>
<li>Bugfix: XML mixins of single/double quotes in attributes failed #108</li>
<li>Bugfix: dot char within XML attribute names not recognized</li>
<li>Bugfix: kotlin raw string where not correctly parsed (wrong rule priority)</li>
<li>Bugfix: highlighting color of <code>classic</code> theme not applied due to invalid selectors - thanks to <a href="https://github.com/EnlighterJS/EnlighterJS/issues/117">woolseyj on GitHub</a></li>
<li>Bugfix: EnlighterJS codeblock css selectors cannot contain quotes due to initialization code sanitizing (replace with serialized object)</li>
<li>Bugfix: due to changes in the initialization code in <code>4.3.0</code> the global config couldn&#39;t be retrieved by the editing plugins</li>
</ul>

0 comments on commit e5592d9

Please sign in to comment.