Plugin Directory

Changeset 1942005


Ignore:
Timestamp:
09/16/2018 12:31:03 AM (7 years ago)
Author:
ascom
Message:

1.9.1

Location:
wp-katex
Files:
3 edited
62 copied

Legend:

Unmodified
Added
Removed
  • wp-katex/tags/1.9.1/readme.txt

    r1941921 r1942005  
    55Requires at least: 3.9
    66Tested up to: 4.9
    7 Stable tag: 1.9.0
     7Stable tag: 1.9.1
    88Requires PHP: 5.3
    99License: GPL2
     
    4040
    4141== Changelog ==
     42= 1.9.1 =
     43* Fix bug causing all equations to show in display style
     44
    4245= 1.9.0 =
    4346* Code cleanup and other minor improvements
  • wp-katex/tags/1.9.1/scripts/frontend.php

    r1941921 r1942005  
    3030
    3131    $enc = htmlspecialchars( html_entity_decode( $content ) );
    32     if ( $latex_atts['display'] || strpos( $content, '\\displaystyle' ) === 0 ) {
     32    $displayAttr = $latex_atts['display']; // TODO: This is disgusting
     33    if ( $displayAttr === "true" || $displayAttr === "1" || strpos( $content, '\\displaystyle' ) === 0 ) {
    3334        return '<span class="wp-katex-eq katex-display" data-display="true">' . $enc . '</span>';
    3435    } else {
     
    4344    if ( $katex_using ) {
    4445        // @formatter:off
    45         ?><script>!function(){"use strict";var e=document.querySelectorAll(".wp-katex-eq");Array.prototype.forEach.call(e,function(e){var t={displayMode:"true"===e.getAttribute("data-display"),throwOnError:!1},r=document.createElement("span");try{katex.render(e.textContent,r,t)}catch(a){r.style.color="red",r.textContent=a.message}e.parentNode.replaceChild(r,e)})}();</script><?php
     46        ?><script>!function(){"use strict";for(var e=document.querySelectorAll(".wp-katex-eq"),t=0;t<e.length;t++){var r=e[t],a=document.createElement("span");try{katex.render(r.textContent,a,{displayMode:"true"===r.getAttribute("data-display"),throwOnError:!1})}catch(n){a.style.color="red",a.textContent=n.message}r.parentNode.replaceChild(a,r)}}();</script><?php
    4647        // @formatter:on
    4748    }
  • wp-katex/tags/1.9.1/wp-katex.php

    r1941930 r1942005  
    44Plugin URI: https://andrewsun.com/projects/wp-katex/
    55Description: Embeds beautiful math in your posts with KaTeX, a very fast LaTeX typesetter.
    6 Version: 1.9.0
     6Version: 1.9.1
    77Author: Andrew Sun
    88Author URI: https://andrewsun.com/
  • wp-katex/trunk/readme.txt

    r1941921 r1942005  
    55Requires at least: 3.9
    66Tested up to: 4.9
    7 Stable tag: 1.9.0
     7Stable tag: 1.9.1
    88Requires PHP: 5.3
    99License: GPL2
     
    4040
    4141== Changelog ==
     42= 1.9.1 =
     43* Fix bug causing all equations to show in display style
     44
    4245= 1.9.0 =
    4346* Code cleanup and other minor improvements
  • wp-katex/trunk/scripts/frontend.php

    r1941921 r1942005  
    3030
    3131    $enc = htmlspecialchars( html_entity_decode( $content ) );
    32     if ( $latex_atts['display'] || strpos( $content, '\\displaystyle' ) === 0 ) {
     32    $displayAttr = $latex_atts['display']; // TODO: This is disgusting
     33    if ( $displayAttr === "true" || $displayAttr === "1" || strpos( $content, '\\displaystyle' ) === 0 ) {
    3334        return '<span class="wp-katex-eq katex-display" data-display="true">' . $enc . '</span>';
    3435    } else {
     
    4344    if ( $katex_using ) {
    4445        // @formatter:off
    45         ?><script>!function(){"use strict";var e=document.querySelectorAll(".wp-katex-eq");Array.prototype.forEach.call(e,function(e){var t={displayMode:"true"===e.getAttribute("data-display"),throwOnError:!1},r=document.createElement("span");try{katex.render(e.textContent,r,t)}catch(a){r.style.color="red",r.textContent=a.message}e.parentNode.replaceChild(r,e)})}();</script><?php
     46        ?><script>!function(){"use strict";for(var e=document.querySelectorAll(".wp-katex-eq"),t=0;t<e.length;t++){var r=e[t],a=document.createElement("span");try{katex.render(r.textContent,a,{displayMode:"true"===r.getAttribute("data-display"),throwOnError:!1})}catch(n){a.style.color="red",a.textContent=n.message}r.parentNode.replaceChild(a,r)}}();</script><?php
    4647        // @formatter:on
    4748    }
  • wp-katex/trunk/wp-katex.php

    r1941930 r1942005  
    44Plugin URI: https://andrewsun.com/projects/wp-katex/
    55Description: Embeds beautiful math in your posts with KaTeX, a very fast LaTeX typesetter.
    6 Version: 1.9.0
     6Version: 1.9.1
    77Author: Andrew Sun
    88Author URI: https://andrewsun.com/
Note: See TracChangeset for help on using the changeset viewer.