Skip to content
This repository was archived by the owner on Nov 2, 2024. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const addSyntaxToCodeBlock = ( settings ) => {
type: 'string',
selector: 'code',
source: 'attribute',
attribute: 'lang',
attribute: 'data-lang',
},
lineNumbers: {
type: 'boolean',
Expand Down
2 changes: 1 addition & 1 deletion src/save.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const save = ( { attributes } ) => {
cls = ( attributes.lineNumbers ) ? cls + ' line-numbers' : cls;
return (
<pre title={ attributes.title }>
<code lang={ attributes.language } className={ cls }>
<code data-lang={ attributes.language } className={ cls }>
{ attributes.content }
</code>
</pre>
Expand Down