diff --git a/index.php b/index.php index da5a0f4..ae4d6fd 100644 --- a/index.php +++ b/index.php @@ -193,10 +193,10 @@ function mkaz_prism_theme_css_ver() { add_filter( 'wp_kses_allowed_html', function( $tags ) { if ( is_array( $tags['code'] ) ) { - $tags['code']['lang'] = array(); + $tags['code']['data-lang'] = array(); } else { $tags['code'] = array( - 'lang' => array(), + 'data-lang' => array(), ); } return $tags; diff --git a/src/index.js b/src/index.js index b07e4e7..9c39c9e 100644 --- a/src/index.js +++ b/src/index.js @@ -28,7 +28,7 @@ const addSyntaxToCodeBlock = ( settings ) => { type: 'string', selector: 'code', source: 'attribute', - attribute: 'lang', + attribute: 'data-lang', }, lineNumbers: { type: 'boolean', diff --git a/src/save.js b/src/save.js index dd37e85..ac09262 100644 --- a/src/save.js +++ b/src/save.js @@ -5,7 +5,7 @@ const save = ( { attributes } ) => { cls = ( attributes.lineNumbers ) ? cls + ' line-numbers' : cls; return (
-
+
{ attributes.content }