Skip to content

Commit

Permalink
Merge pull request #63 from paulschreiber/master
Browse files Browse the repository at this point in the history
Update for 6.6.2
  • Loading branch information
paulschreiber authored Sep 12, 2024
2 parents ed41f8e + 2e1cc32 commit 0b7c686
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 43 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Contributors: philliplord, sjcockell, knowledgeblog, d_swan, paulschreiber, jwenerd
Tags: mathematics, math, latex, mathml, mathjax, science, res-comms, scholar, academic
Requires at least: 3.0
Tested up to: 6.1.1
Tested up to: 6.6.2
Stable tag: 1.3.12
Requires PHP: 7.0.0
License: GPLv2
Expand Down Expand Up @@ -118,10 +118,12 @@ this plugin! Thanks to Jared Wenerd and Paul Schreiber.
1. Tested against MathJax2.1

### 1.0

1. Compatibility with MathJax 1.1. Load a default configuration from the MathJax distribution.
1. Use the MathJax Content Distribution Network to deliver the javascript library. Offers improved performance and stability.

### 0.2

1. MathJax.js can be loaded form a configurable URL. Defaults to $PLUGIN/MathJax/MathJax.js

== Upgrade Notice ==
Expand All @@ -140,6 +142,7 @@ Bug fix: Force load was not correctly applied.
Security update. All users advised to update. Options will require resetting.

### 1.1

Documentation updates only. Upgrade for existing users is optional.

### 1.0
Expand Down
7 changes: 5 additions & 2 deletions class-mathjax-latex.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,10 @@ public static function add_script() {
$mathjax_location = get_option( 'kblog_mathjax_custom_location' );
}

$config = get_option( 'kblog_mathjax_config' ) ?: 'default';
$config = get_option( 'kblog_mathjax_config' );
if ( ! $config ) {
$config = 'default';
}
$mathjax_url = add_query_arg( 'config', $config, $mathjax_location );

wp_enqueue_script( 'mathjax', $mathjax_url, false, MATHJAX_PLUGIN_VERSION, false );
Expand Down Expand Up @@ -305,7 +308,7 @@ public static function mathjax_settings_link( $actions, $plugin_file ) {
public static function filter_br_tags_on_math( $content ) {
$filtered_content = preg_replace_callback(
'/(<math.*>.*<\/math>)/isU',
function( $matches ) {
function ( $matches ) {
return str_replace( [ '<br/>', '<br />', '<br>' ], '', $matches[0] );
},
$content
Expand Down
140 changes: 101 additions & 39 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Contributors: philliplord, sjcockell, knowledgeblog, d_swan, paulschreiber, jwenerd
Tags: mathematics, math, latex, mathml, mathjax, science, res-comms, scholar, academic
Requires at least: 3.0
Tested up to: 6.1.1
Tested up to: 6.6.2
Stable tag: 1.3.12
Requires PHP: 7.0.0
License: GPLv2
Expand Down

0 comments on commit 0b7c686

Please sign in to comment.