Updates Prismatic to version 2.2

git-svn-id: https://plugins.svn.wordpress.org/prismatic/trunk@2142173 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
Jeff Starr 2019-08-19 20:47:04 +00:00
parent cde955fa2b
commit ad1574c5c5
33 changed files with 1041 additions and 118 deletions

10
css/styles-blocks.css Normal file
View File

@ -0,0 +1,10 @@
/* Prismatic - Block Styles */
.block-editor .editor-plain-text.block-editor-plain-text.wp-block-prismatic-blocks[style] {
padding: 20px; line-height: 22px; font-size: 14px; font-family: Menlo, Consolas, Monaco, monospace;
white-space: pre; resize: vertical !important; overflow-x: auto !important; overflow-y: hidden !important;
-webkit-hyphens: none; -moz-hyphens: none; -ms-hyphens: none; hyphens: none;
-moz-tab-size: 4; -o-tab-size: 4; tab-size: 4;
-ms-word-break: normal; word-break: normal;
-webkit-overflow-scrolling: touch;
}

12
css/styles-buttons.css Normal file
View File

@ -0,0 +1,12 @@
/* Prismatic - TinyMCE Button Styles */
i.mce-i-code {
font: 400 20px/1 dashicons;
padding: 0;
vertical-align: top;
speak: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
margin-left: -2px;
padding-right: 2px;
}
i.mce-i-code:before { content: '\f475'; }

View File

@ -1,6 +1,6 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="https://www.w3.org/2000/svg">
<metadata></metadata>
<defs>
<font id="fontawesomeregular" horiz-adv-x="1536" >

Before

Width:  |  Height:  |  Size: 357 KiB

After

Width:  |  Height:  |  Size: 357 KiB

View File

@ -1,6 +1,6 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="https://www.w3.org/2000/svg">
<metadata></metadata>
<defs>
<font id="icomoonregular" horiz-adv-x="2048" >

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

47
inc/prismatic-blocks.php Normal file
View File

@ -0,0 +1,47 @@
<?php // Prismatic - Gutenberg Blocks
function prismatic_register_block_assets() {
global $prismatic_options_general;
$script_url = null;
if (isset($prismatic_options_general['library'])) {
if ($prismatic_options_general['library'] === 'prism') {
$script_url = plugins_url('/js/blocks-prism.js', dirname(__FILE__));
} elseif ($prismatic_options_general['library'] === 'highlight') {
$script_url = plugins_url('/js/blocks-highlight.js', dirname(__FILE__));
} elseif ($prismatic_options_general['library'] === 'plain') {
$script_url = plugins_url('/js/blocks-plain.js', dirname(__FILE__));
}
}
if ($script_url) {
$style_url = plugins_url('/css/styles-blocks.css', dirname(__FILE__));
$script_dep = ['wp-i18n', 'wp-element', 'wp-blocks', 'wp-components', 'wp-editor', 'wp-hooks'];
$style_dep = [];
wp_register_script('prismatic-blocks', $script_url, $script_dep);
wp_register_style ('prismatic-blocks', $style_url, $style_dep);
register_block_type('prismatic/blocks', array('editor_script' => 'prismatic-blocks', 'style' => 'prismatic-blocks', 'render_callback' => 'prismatic_render_html'));
}
}
function prismatic_render_html($attributes, $content) {
return html_entity_decode($content);
}

62
inc/prismatic-buttons.php Normal file
View File

@ -0,0 +1,62 @@
<?php // Prismatic - TimyMCE Quicktag Buttons
function prismatic_buttons() {
if (current_user_can('edit_posts') && current_user_can('edit_pages')) {
add_filter('mce_buttons', 'prismatic_register_buttons');
add_filter('mce_external_plugins', 'prismatic_add_buttons');
}
}
function prismatic_register_buttons($buttons) {
array_push($buttons, 'button_prism', 'button_highlight');
return $buttons;
}
function prismatic_add_buttons($plugin_array) {
global $prismatic_options_general;
if (isset($prismatic_options_general['library'])) {
if ($prismatic_options_general['library'] === 'prism') {
$plugin_array['prismatic_buttons'] = plugins_url('/js/buttons-prism.js', dirname(__FILE__));
} elseif ($prismatic_options_general['library'] === 'highlight') {
$plugin_array['prismatic_buttons'] = plugins_url('/js/buttons-highlight.js', dirname(__FILE__));
} elseif ($prismatic_options_general['library'] === 'plain') {
$plugin_array['prismatic_buttons'] = plugins_url('/js/buttons-plain.js', dirname(__FILE__));
}
}
return $plugin_array;
}
function prismatic_add_quicktags() {
if (wp_script_is('quicktags')) :
// QTags.addButton( id, display, arg1, arg2, access_key, title, priority, instance );
?>
<script type="text/javascript">
QTags.addButton('prismatic_pre', 'pre', '<pre><code class="language-">', '</code></pre>', 'z', 'Preformatted Code');
</script>
<?php endif;
}

View File

@ -96,11 +96,11 @@ function prismatic_check_admin($library, $filter) {
$settings = 'prismatic_options_'. $library;
global ${$settings};
$setting = 'filter_'. $filter;
$option = isset(${$settings}[$setting]) ? ${$settings}[$setting] : false;
$options = prismatic_get_default_options($library);
$option = isset($options[$setting]) ? $options[$setting] : false;
if ($option === 'admin' || $option === 'both') return true;
@ -112,11 +112,11 @@ function prismatic_check_front($library, $filter) {
$settings = 'prismatic_options_'. $library;
global ${$settings};
$setting = 'filter_'. $filter;
$option = isset(${$settings}[$setting]) ? ${$settings}[$setting] : false;
$options = prismatic_get_default_options($library);
$option = isset($options[$setting]) ? $options[$setting] : false;
if ($option === 'front' || $option === 'both') return true;
@ -140,7 +140,7 @@ function prismatic_add_filters() {
if (prismatic_check_front($library, 'content')) {
add_filter('the_content', 'prismatic_encode', 1);
add_filter('the_content', 'prismatic_decode_replace', 99);
add_filter('the_content', 'prismatic_decode_replace', 3);
}
@ -176,3 +176,37 @@ function prismatic_add_filters() {
}
}
function prismatic_get_default_options($section) {
$options = '';
if ($section === 'general') {
global $prismatic_options_general;
$options = $prismatic_options_general;
} elseif ($section === 'prism') {
global $prismatic_options_prism;
$options = $prismatic_options_prism;
} elseif ($section === 'highlight') {
global $prismatic_options_highlight;
$options = $prismatic_options_highlight;
} elseif ($section === 'plain') {
global $prismatic_options_plain;
$options = $prismatic_options_plain;
}
return $options;
}

View File

@ -70,6 +70,20 @@ function prismatic_enqueue_settings() {
}
function prismatic_enqueue_buttons() {
$screen = get_current_screen();
if (!property_exists($screen, 'id')) return;
if ($screen->id === 'post' || $screen->id === 'page') {
wp_enqueue_style('prismatic-buttons', PRISMATIC_URL .'css/styles-buttons.css', array(), null);
}
}
function prismatic_get_vars_admin() {
$data = array(
@ -375,6 +389,7 @@ function prismatic_prism_classes() {
'language-scss',
'language-sql',
'language-swift',
'language-tsx',
'language-twig',
'language-typescript',
'language-visual-basic',
@ -424,6 +439,7 @@ function prismatic_prism_classes() {
'lang-scss',
'lang-sql',
'lang-swift',
'lang-tsx',
'lang-twig',
'lang-typescript',
'lang-visual-basic',

View File

@ -10,7 +10,7 @@ function prismatic_section_general() {
function prismatic_section_prism() {
echo '<p>'. esc_html__('Settings for syntax highlighting via', 'prismatic') .' <a target="_blank" rel="noopener noreferrer" href="http://prismjs.com/">'. esc_html__('Prism.js', 'prismatic') .'</a>.</p>';
echo '<p>'. esc_html__('Settings for syntax highlighting via', 'prismatic') .' <a target="_blank" rel="noopener noreferrer" href="https://prismjs.com/">'. esc_html__('Prism.js', 'prismatic') .'</a>.</p>';
}
@ -148,9 +148,7 @@ function prismatic_callback_select($args) {
$setting = 'prismatic_options_'. $section;
global ${$setting};
$options = ${$setting};
$options = prismatic_get_default_options($section);
$value = isset($options[$id]) ? sanitize_text_field($options[$id]) : '';
@ -191,9 +189,7 @@ function prismatic_callback_text($args) {
$setting = 'prismatic_options_'. $section;
global ${$setting};
$options = ${$setting};
$options = prismatic_get_default_options($section);
$value = isset($options[$id]) ? sanitize_text_field($options[$id]) : '';
@ -210,9 +206,7 @@ function prismatic_callback_textarea($args) {
$setting = 'prismatic_options_'. $section;
global ${$setting};
$options = ${$setting};
$options = prismatic_get_default_options($section);
$allowed_tags = wp_kses_allowed_html('post');
@ -231,9 +225,7 @@ function prismatic_callback_checkbox($args) {
$setting = 'prismatic_options_'. $section;
global ${$setting};
$options = ${$setting};
$options = prismatic_get_default_options($section);
$checked = isset($options[$id]) ? checked($options[$id], 1, false) : '';
@ -250,9 +242,7 @@ function prismatic_callback_number($args) {
$setting = 'prismatic_options_'. $section;
global ${$setting};
$options = ${$setting};
$options = prismatic_get_default_options($section);
$value = isset($options[$id]) ? sanitize_text_field($options[$id]) : '';

View File

@ -23,9 +23,9 @@ function prismatic_register_settings() {
add_settings_section('settings_prism', 'Prism.js settings', 'prismatic_section_prism', 'prismatic_options_prism');
add_settings_field('prism_theme', 'Theme', 'prismatic_callback_select', 'prismatic_options_prism', 'settings_prism', array('id' => 'prism_theme', 'section' => 'prism', 'label' => esc_html__('Prism theme', 'prismatic')));
add_settings_field('line_highlight', 'Line Highlight', 'prismatic_callback_checkbox', 'prismatic_options_prism', 'settings_prism', array('id' => 'line_highlight', 'section' => 'prism', 'label' => esc_html__('Enable', 'prismatic') .' <a target="_blank" rel="noopener noreferrer" href="http://prismjs.com/plugins/line-highlight/">'. esc_html__('Line Highlight', 'prismatic') .'</a>'));
add_settings_field('line_numbers', 'Line Numbers', 'prismatic_callback_checkbox', 'prismatic_options_prism', 'settings_prism', array('id' => 'line_numbers', 'section' => 'prism', 'label' => esc_html__('Enable', 'prismatic') .' <a target="_blank" rel="noopener noreferrer" href="http://prismjs.com/plugins/line-numbers/">'. esc_html__('Line Numbers', 'prismatic') .'</a>'));
add_settings_field('show_language', 'Show Language', 'prismatic_callback_checkbox', 'prismatic_options_prism', 'settings_prism', array('id' => 'show_language', 'section' => 'prism', 'label' => esc_html__('Enable', 'prismatic') .' <a target="_blank" rel="noopener noreferrer" href="http://prismjs.com/plugins/show-language/">'. esc_html__('Show Language', 'prismatic') .'</a>'));
add_settings_field('line_highlight', 'Line Highlight', 'prismatic_callback_checkbox', 'prismatic_options_prism', 'settings_prism', array('id' => 'line_highlight', 'section' => 'prism', 'label' => esc_html__('Enable', 'prismatic') .' <a target="_blank" rel="noopener noreferrer" href="https://prismjs.com/plugins/line-highlight/">'. esc_html__('Line Highlight', 'prismatic') .'</a>'));
add_settings_field('line_numbers', 'Line Numbers', 'prismatic_callback_checkbox', 'prismatic_options_prism', 'settings_prism', array('id' => 'line_numbers', 'section' => 'prism', 'label' => esc_html__('Enable', 'prismatic') .' <a target="_blank" rel="noopener noreferrer" href="https://prismjs.com/plugins/line-numbers/">'. esc_html__('Line Numbers', 'prismatic') .'</a>'));
add_settings_field('show_language', 'Show Language', 'prismatic_callback_checkbox', 'prismatic_options_prism', 'settings_prism', array('id' => 'show_language', 'section' => 'prism', 'label' => esc_html__('Enable', 'prismatic') .' <a target="_blank" rel="noopener noreferrer" href="https://prismjs.com/plugins/show-language/">'. esc_html__('Show Language', 'prismatic') .'</a>'));
add_settings_field('singular_only', 'Limit to Posts', 'prismatic_callback_checkbox', 'prismatic_options_prism', 'settings_prism', array('id' => 'singular_only', 'section' => 'prism', 'label' => esc_html__('Limit to Posts and Pages', 'prismatic')));
add_settings_section('settings_prism_code', 'Code Escaping', 'prismatic_section_prism_code', 'prismatic_options_prism');

144
js/blocks-highlight.js Normal file
View File

@ -0,0 +1,144 @@
/* Prismatic - Highlight.js Block */
var
el = wp.element.createElement,
Fragment = wp.element.Fragment,
registerBlockType = wp.blocks.registerBlockType,
RichText = wp.editor.RichText,
PlainText = wp.editor.PlainText,
RawHTML = wp.editor.RawHTML,
InspectorControls = wp.editor.InspectorControls,
SelectControl = wp.components.SelectControl,
__ = wp.i18n.__;
registerBlockType('prismatic/blocks', {
title : 'Prismatic',
icon : 'editor-code',
category : 'formatting',
keywords : [
__('code', 'prismatic'),
__('pre', 'prismatic'),
__('prism', 'prismatic'),
__('highlight', 'prismatic'),
__('prismatic', 'prismatic')
],
attributes : {
content : {
type : 'string',
source : 'text',
selector : 'pre code',
},
language : {
type : 'string',
default : '',
},
backgroundColor : {
type : 'string',
default : '#f7f7f7',
},
textColor : {
type : 'string',
default : '#373737',
},
},
edit : function(props) {
var
content = props.attributes.content,
language = props.attributes.language,
backgroundColor = props.attributes.backgroundColor,
textColor = props.attributes.textColor,
className = props.className;
function onChangeContent(newValue) {
props.setAttributes({ content: newValue });
}
function onChangelanguage(newValue) {
props.setAttributes({ language: newValue });
}
return (
el(
Fragment,
null,
el(
InspectorControls,
null,
el(
SelectControl,
{
label : __('Select Language for Highlight.js', 'prismatic'),
value : language,
onChange : onChangelanguage,
options : [
{ label : 'Language..', value : '' },
{ label : 'Apache', value : 'apache' },
{ label : 'AppleScript', value : 'applescript' },
{ label : 'Arduino', value : 'arduino' },
{ label : 'Bash', value : 'bash' },
{ label : 'C#', value : 'cs' },
{ label : 'C++', value : 'cpp' },
{ label : 'CSS', value : 'css' },
{ label : 'CoffeeScript', value : 'coffeescript' },
{ label : 'D', value : 'd' },
{ label : 'Dart', value : 'dart' },
{ label : 'Diff', value : 'diff' },
{ label : 'GML', value : 'gml' },
{ label : 'Go', value : 'go' },
{ label : 'Groovy', value : 'groovy' },
{ label : 'HTML/XML', value : 'xml' },
{ label : 'HTTP', value : 'http' },
{ label : 'Ini', value : 'ini' },
{ label : 'JSON', value : 'json' },
{ label : 'Java', value : 'java' },
{ label : 'JavaScript', value : 'javascript' },
{ label : 'Kotlin', value : 'kotlin' },
{ label : 'Lua', value : 'lua' },
{ label : 'Makefile', value : 'makefile' },
{ label : 'Markdown', value : 'markdown' },
{ label : 'Nginx', value : 'nginx' },
{ label : 'Objective-C', value : 'objectivec' },
{ label : 'PHP', value : 'php' },
{ label : 'Perl', value : 'perl' },
{ label : 'PowerShell', value : 'powershell' },
{ label : 'Python', value : 'python' },
{ label : 'Ruby', value : 'ruby' },
{ label : 'Scala', value : 'scala' },
{ label : 'Shell Session', value : 'shell' },
{ label : 'SQL', value : 'sql' },
{ label : 'Swift', value : 'swift' },
{ label : 'TypeScript', value : 'typescript' },
{ label : 'YAML', value : 'yaml' },
]
}
)
),
el(
PlainText,
{
tagName : 'pre',
key : 'editable',
placeholder : __('Add code..', 'prismatic'),
className : className,
onChange : onChangeContent,
style : { backgroundColor : backgroundColor, color : textColor },
value : content,
}
)
)
);
},
save : function(props) {
var
content = props.attributes.content,
language = props.attributes.language;
return el('pre', null, el('code', { className: 'language-'+ language }, content));
},
});

62
js/blocks-plain.js Normal file
View File

@ -0,0 +1,62 @@
/* Prismatic - Plain Flavor Block */
var
el = wp.element.createElement,
registerBlockType = wp.blocks.registerBlockType,
PlainText = wp.editor.PlainText,
__ = wp.i18n.__;
registerBlockType('prismatic/blocks', {
title : 'Prismatic',
icon : 'editor-code',
category : 'formatting',
keywords : [
__('code', 'prismatic'),
__('pre', 'prismatic'),
__('prism', 'prismatic'),
__('highlight', 'prismatic'),
__('prismatic', 'prismatic')
],
attributes : {
content : {
type : 'string',
source : 'text',
selector : 'pre code',
},
backgroundColor : {
type : 'string',
default : '#f7f7f7',
},
textColor : {
type : 'string',
default : '#373737',
},
},
edit : function(props) {
function onChangeContent(newValue) {
props.setAttributes({ content: newValue });
}
return el(
PlainText,
{
tagName : 'pre',
key : 'editable',
placeholder : __('Add code..', 'prismatic'),
onChange : onChangeContent,
className : props.className,
style : { backgroundColor : props.attributes.backgroundColor, color : props.attributes.textColor },
value : props.attributes.content,
}
);
},
save : function(props) {
return el('pre', null, el('code', null, props.attributes.content));
},
});

155
js/blocks-prism.js Normal file
View File

@ -0,0 +1,155 @@
/* Prismatic - Prism.js Block */
var
el = wp.element.createElement,
Fragment = wp.element.Fragment,
registerBlockType = wp.blocks.registerBlockType,
RichText = wp.editor.RichText,
PlainText = wp.editor.PlainText,
RawHTML = wp.editor.RawHTML,
InspectorControls = wp.editor.InspectorControls,
SelectControl = wp.components.SelectControl,
__ = wp.i18n.__;
registerBlockType('prismatic/blocks', {
title : 'Prismatic',
icon : 'editor-code',
category : 'formatting',
keywords : [
__('code', 'prismatic'),
__('pre', 'prismatic'),
__('prism', 'prismatic'),
__('highlight', 'prismatic'),
__('prismatic', 'prismatic')
],
attributes : {
content : {
type : 'string',
source : 'text',
selector : 'pre code',
},
language : {
type : 'string',
default : '',
},
backgroundColor : {
type : 'string',
default : '#f7f7f7',
},
textColor : {
type : 'string',
default : '#373737',
},
},
edit : function(props) {
var
content = props.attributes.content,
language = props.attributes.language,
backgroundColor = props.attributes.backgroundColor,
textColor = props.attributes.textColor,
className = props.className;
function onChangeContent(newValue) {
props.setAttributes({ content: newValue });
}
function onChangelanguage(newValue) {
props.setAttributes({ language: newValue });
}
return (
el(
Fragment,
null,
el(
InspectorControls,
null,
el(
SelectControl,
{
label : __('Select Language for Prism.js', 'prismatic'),
value : language,
onChange : onChangelanguage,
options : [
{ label : 'Language..', value : '' },
{ label : 'Apache', value : 'apacheconf' },
{ label : 'AppleScript', value : 'applescript' },
{ label : 'Arduino', value : 'arduino' },
{ label : 'Bash', value : 'bash' },
{ label : 'C', value : 'c' },
{ label : 'C#', value : 'csharp' },
{ label : 'C++', value : 'cpp' },
{ label : 'C-like', value : 'clike' },
{ label : 'CoffeeScript', value : 'coffeescript' },
{ label : 'CSS', value : 'css' },
{ label : 'D', value : 'd' },
{ label : 'Dart', value : 'dart' },
{ label : 'Diff', value : 'diff' },
{ label : 'Git', value : 'git' },
{ label : 'Go', value : 'go' },
{ label : 'GraphQL', value : 'graphql' },
{ label : 'Groovy', value : 'groovy' },
{ label : 'HTML', value : 'markup' },
{ label : 'HTTP', value : 'http' },
{ label : 'Ini', value : 'ini' },
{ label : 'Java', value : 'java' },
{ label : 'JavaScript', value : 'javascript' },
{ label : 'JSON', value : 'json' },
{ label : 'JSX', value : 'jsx' },
{ label : 'Kotlin', value : 'kotlin' },
{ label : 'LaTeX', value : 'latex' },
{ label : 'Lua', value : 'lua' },
{ label : 'Makefile', value : 'makefile' },
{ label : 'Markdown', value : 'markdown' },
{ label : 'Markup', value : 'markup' },
{ label : 'NGINX', value : 'nginx' },
{ label : 'Objective-C', value : 'objectivec' },
{ label : 'Pascal', value : 'pascal' },
{ label : 'Perl', value : 'perl' },
{ label : 'PHP', value : 'php' },
{ label : 'PowerShell', value : 'powershell' },
{ label : 'Python', value : 'python' },
{ label : 'Ruby', value : 'ruby' },
{ label : 'SASS', value : 'sass' },
{ label : 'Scala', value : 'scala' },
{ label : 'SCSS', value : 'scss' },
{ label : 'SQL', value : 'sql' },
{ label : 'Swift', value : 'swift' },
{ label : 'TSX', value : 'tsx' },
{ label : 'Twig', value : 'twig' },
{ label : 'TypeScript', value : 'typescript' },
{ label : 'Visual Basic', value : 'visual-basic' },
{ label : 'YAML', value : 'yaml' },
]
}
)
),
el(
PlainText,
{
tagName : 'pre',
key : 'editable',
placeholder : __('Add code..', 'prismatic'),
className : className,
onChange : onChangeContent,
style : { backgroundColor : backgroundColor, color : textColor },
value : content,
}
)
)
);
},
save : function(props) {
var
content = props.attributes.content,
language = props.attributes.language;
return el('pre', null, el('code', { className: 'language-'+ language }, content));
},
});

119
js/buttons-highlight.js Normal file
View File

@ -0,0 +1,119 @@
/* Prismatic - TinyMCE Buttons for Highlight.js */
(function() {
'use strict';
tinymce.create('tinymce.plugins.PrismaticButtons', {
init : function(ed, url) {
ed.addButton('button_prism', {
title : 'Add Highlight.js Code',
icon : 'code',
onclick : function() {
var code = {
language : '',
snippet : ''
};
ed.windowManager.open({
title : 'Add Highlight.js code',
tooltip : 'Add Highlight.js code',
minWidth : 400,
minHeight : 300,
body : [
{
type : 'listbox',
name : 'language',
value : '',
minWidth : 400,
value : code.language,
values : [
{ text : 'Language..', value : '' },
{ text : 'Apache', value : 'apache' },
{ text : 'AppleScript', value : 'applescript' },
{ text : 'Arduino', value : 'arduino' },
{ text : 'Bash', value : 'bash' },
{ text : 'C#', value : 'cs' },
{ text : 'C++', value : 'cpp' },
{ text : 'CSS', value : 'css' },
{ text : 'CoffeeScript', value : 'coffeescript' },
{ text : 'D', value : 'd' },
{ text : 'Dart', value : 'dart' },
{ text : 'Diff', value : 'diff' },
{ text : 'GML', value : 'gml' },
{ text : 'Go', value : 'go' },
{ text : 'Groovy', value : 'groovy' },
{ text : 'HTML/XML', value : 'xml' },
{ text : 'HTTP', value : 'http' },
{ text : 'Ini', value : 'ini' },
{ text : 'JSON', value : 'json' },
{ text : 'Java', value : 'java' },
{ text : 'JavaScript', value : 'javascript' },
{ text : 'Kotlin', value : 'kotlin' },
{ text : 'Lua', value : 'lua' },
{ text : 'Makefile', value : 'makefile' },
{ text : 'Markdown', value : 'markdown' },
{ text : 'Nginx', value : 'nginx' },
{ text : 'Objective-C', value : 'objectivec' },
{ text : 'PHP', value : 'php' },
{ text : 'Perl', value : 'perl' },
{ text : 'PowerShell', value : 'powershell' },
{ text : 'Python', value : 'python' },
{ text : 'Ruby', value : 'ruby' },
{ text : 'Scala', value : 'scala' },
{ text : 'Shell Session', value : 'shell' },
{ text : 'SQL', value : 'sql' },
{ text : 'Swift', value : 'swift' },
{ text : 'TypeScript', value : 'typescript' },
{ text : 'YAML', value : 'yaml' },
],
onselect : function() {
code.language = this.value();
},
},
{
type : 'textbox',
name : 'snippet',
placeholder : 'Add Code Here',
value : '',
minWidth : 400,
minHeight : 300,
multiline : true,
value : code.snippet,
oninput : function() {
code.snippet = this.value();
}
}
],
onsubmit : function() {
ed.insertContent('<pre><code class="language-'+ code.language +'">'+ code.snippet + '</code></pre>');
}
});
}
});
},
createControl : function(n, cm) {
return null;
},
});
tinymce.PluginManager.add('prismatic_buttons', tinymce.plugins.PrismaticButtons);
})();

66
js/buttons-plain.js Normal file
View File

@ -0,0 +1,66 @@
/* Prismatic - TinyMCE Buttons for Plain Flavor */
(function() {
'use strict';
tinymce.create('tinymce.plugins.PrismaticButtons', {
init : function(ed, url) {
ed.addButton('button_prism', {
title : 'Add Preformatted Code',
icon : 'code',
onclick : function() {
var code = {
snippet : ''
};
ed.windowManager.open({
title : 'Add Preformatted Code',
tooltip : 'Add Preformatted Code',
minWidth : 400,
minHeight : 300,
body : [
{
type : 'textbox',
name : 'snippet',
placeholder : 'Add Code Here',
value : '',
minWidth : 400,
minHeight : 300,
multiline : true,
value : code.snippet,
oninput : function() {
code.snippet = this.value();
}
}
],
onsubmit : function() {
ed.insertContent('<pre><code>'+ code.snippet + '</code></pre>');
}
});
}
});
},
createControl : function(n, cm) {
return null;
},
});
tinymce.PluginManager.add('prismatic_buttons', tinymce.plugins.PrismaticButtons);
})();

130
js/buttons-prism.js Normal file
View File

@ -0,0 +1,130 @@
/* Prismatic - TinyMCE Buttons for Prism.js */
(function() {
'use strict';
tinymce.create('tinymce.plugins.PrismaticButtons', {
init : function(ed, url) {
ed.addButton('button_prism', {
title : 'Add Prism.js code',
icon : 'code',
onclick : function() {
var code = {
language : '',
snippet : ''
};
ed.windowManager.open({
title : 'Add Prism.js code',
tooltip : 'Add Prism.js code',
minWidth : 400,
minHeight : 300,
body : [
{
type : 'listbox',
name : 'language',
value : '',
minWidth : 400,
value : code.language,
values : [
{ text : 'Language..', value : '' },
{ text : 'Apache', value : 'apacheconf' },
{ text : 'AppleScript', value : 'applescript' },
{ text : 'Arduino', value : 'arduino' },
{ text : 'Bash', value : 'bash' },
{ text : 'C', value : 'c' },
{ text : 'C#', value : 'csharp' },
{ text : 'C++', value : 'cpp' },
{ text : 'C-like', value : 'clike' },
{ text : 'CoffeeScript', value : 'coffeescript' },
{ text : 'CSS', value : 'css' },
{ text : 'D', value : 'd' },
{ text : 'Dart', value : 'dart' },
{ text : 'Diff', value : 'diff' },
{ text : 'Git', value : 'git' },
{ text : 'Go', value : 'go' },
{ text : 'GraphQL', value : 'graphql' },
{ text : 'Groovy', value : 'groovy' },
{ text : 'HTML', value : 'markup' },
{ text : 'HTTP', value : 'http' },
{ text : 'Ini', value : 'ini' },
{ text : 'Java', value : 'java' },
{ text : 'JavaScript', value : 'javascript' },
{ text : 'JSON', value : 'json' },
{ text : 'JSX', value : 'jsx' },
{ text : 'Kotlin', value : 'kotlin' },
{ text : 'LaTeX', value : 'latex' },
{ text : 'Lua', value : 'lua' },
{ text : 'Makefile', value : 'makefile' },
{ text : 'Markdown', value : 'markdown' },
{ text : 'Markup', value : 'markup' },
{ text : 'NGINX', value : 'nginx' },
{ text : 'Objective-C', value : 'objectivec' },
{ text : 'Pascal', value : 'pascal' },
{ text : 'Perl', value : 'perl' },
{ text : 'PHP', value : 'php' },
{ text : 'PowerShell', value : 'powershell' },
{ text : 'Python', value : 'python' },
{ text : 'Ruby', value : 'ruby' },
{ text : 'SASS', value : 'sass' },
{ text : 'Scala', value : 'scala' },
{ text : 'SCSS', value : 'scss' },
{ text : 'SQL', value : 'sql' },
{ text : 'Swift', value : 'swift' },
{ text : 'TSX', value : 'tsx' },
{ text : 'Twig', value : 'twig' },
{ text : 'TypeScript', value : 'typescript' },
{ text : 'Visual Basic', value : 'visual-basic' },
{ text : 'YAML', value : 'yaml' },
],
onselect : function() {
code.language = this.value();
},
},
{
type : 'textbox',
name : 'snippet',
placeholder : 'Add Code Here',
value : '',
minWidth : 400,
minHeight : 300,
multiline : true,
value : code.snippet,
oninput : function() {
code.snippet = this.value();
}
}
],
onsubmit : function() {
ed.insertContent('<pre><code class="language-'+ code.language +'">'+ code.snippet + '</code></pre>');
}
});
}
});
},
createControl : function(n, cm) {
return null;
},
});
tinymce.PluginManager.add('prismatic_buttons', tinymce.plugins.PrismaticButtons);
})();

View File

@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-03-09 01:14+0000\n"
"POT-Creation-Date: 2019-08-19 18:46+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: \n"
@ -14,69 +14,69 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Loco https://localise.biz/"
#: prismatic.php:168
#: prismatic.php:174
msgid "Settings"
msgstr ""
#: prismatic.php:182
#: prismatic.php:188
msgid "Plugin Homepage"
msgstr ""
#: prismatic.php:183
#: prismatic.php:189
msgid "Homepage"
msgstr ""
#: prismatic.php:188
#: prismatic.php:194
msgid "Click here to rate and review this plugin on WordPress.org"
msgstr ""
#: prismatic.php:189
#: prismatic.php:195
msgid "Rate this plugin"
msgstr ""
#: prismatic.php:194
#: prismatic.php:200
msgid "Get Prismatic Pro!"
msgstr ""
#: prismatic.php:195
#: prismatic.php:201
msgid "Go&nbsp;Pro"
msgstr ""
#: prismatic.php:214
#: prismatic.php:220
msgid "Warning:"
msgstr ""
#: prismatic.php:215
#: prismatic.php:221
msgid ""
"Pro version of Prismatic currently active. Free and Pro versions cannot be "
"activated at the same time. "
msgstr ""
#: prismatic.php:216 prismatic.php:241
#: prismatic.php:222 prismatic.php:247
msgid "Please return to the"
msgstr ""
#: prismatic.php:216 prismatic.php:242
#: prismatic.php:222 prismatic.php:248
msgid "WP Admin Area"
msgstr ""
#: prismatic.php:217
#: prismatic.php:223
msgid "and try again."
msgstr ""
#: prismatic.php:239
#: prismatic.php:245
msgid "requires WordPress "
msgstr ""
#: prismatic.php:240
#: prismatic.php:246
msgid " or higher, and has been deactivated! "
msgstr ""
#: prismatic.php:242
#: prismatic.php:248
msgid "to upgrade WordPress and try again."
msgstr ""
#: prismatic.php:262 prismatic.php:268
#: prismatic.php:268 prismatic.php:274
msgid "Cheatin&rsquo; huh?"
msgstr ""
@ -179,31 +179,31 @@ msgstr ""
msgid "Twilight"
msgstr ""
#: inc/settings-callbacks.php:273
#: inc/settings-callbacks.php:263
msgid "Restore default plugin options"
msgstr ""
#: inc/settings-callbacks.php:280
#: inc/settings-callbacks.php:270
msgid "Help keep Prismatic going strong! A huge THANK YOU for your support!"
msgstr ""
#: inc/settings-callbacks.php:281 inc/settings-register.php:17
#: inc/settings-callbacks.php:271 inc/settings-register.php:17
msgid "Show support with a 5-star rating &raquo;"
msgstr ""
#: inc/resources-enqueue.php:77
#: inc/resources-enqueue.php:91
msgid "Confirm Reset"
msgstr ""
#: inc/resources-enqueue.php:78
#: inc/resources-enqueue.php:92
msgid "Restore default options?"
msgstr ""
#: inc/resources-enqueue.php:79
#: inc/resources-enqueue.php:93
msgid "Yes, make it so."
msgstr ""
#: inc/resources-enqueue.php:80
#: inc/resources-enqueue.php:94
msgid "No, abort mission."
msgstr ""

View File

@ -10,9 +10,6 @@ School Book style from goldblog.com.ua (c) Zaripov Yura <yur4ik7@ukr.net>
padding: 15px 0.5em 0.5em 30px;
font-size: 11px;
line-height:16px;
}
pre{
background:#f6f6ae url(./school-book.png);
border-top: solid 2px #d2e8b9;
border-bottom: solid 1px #d2e8b9;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
code[class*="language-"],pre[class*="language-"]{color:white;background:none;text-shadow:0 -.1em .2em black;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}@media print{code[class*="language-"],pre[class*="language-"]{text-shadow:none}}pre[class*="language-"],:not(pre) >code[class*="language-"]{background:hsl(30,20%,25%)}pre[class*="language-"]{padding:1em;margin:.5em 0;overflow:auto;border:.3em solid hsl(30,20%,40%);border-radius:.5em;box-shadow:1px 1px .5em black inset}:not(pre) >code[class*="language-"]{padding:.15em .2em .05em;border-radius:.3em;border:.13em solid hsl(30,20%,40%);box-shadow:1px 1px .3em -.1em black inset;white-space:normal}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:hsl(30,20%,50%)}.token.punctuation{opacity:.7}.namespace{opacity:.7}.token.property,.token.tag,.token.boolean,.token.number,.token.constant,.token.symbol{color:hsl(350,40%,70%)}.token.selector,.token.attr-name,.token.string,.token.char,.token.builtin,.token.inserted{color:hsl(75,70%,60%)}.token.operator,.token.entity,.token.url,.language-css .token.string,.style .token.string,.token.variable{color:hsl(40,90%,60%)}.token.atrule,.token.attr-value,.token.keyword{color:hsl(350,40%,70%)}.token.regex,.token.important{color:#e90}.token.important,.token.bold{font-weight:bold}.token.italic{font-style:italic}.token.entity{cursor:help}.token.deleted{color:red}pre[data-line]{position:relative;padding:1em 0 1em 3em}.line-highlight{position:absolute;left:0;right:0;padding:inherit 0;margin-top:1em;background:hsla(24,20%,50%,.08);background:linear-gradient(to right,hsla(24,20%,50%,.1) 70%,hsla(24,20%,50%,0));pointer-events:none;line-height:inherit;white-space:pre}.line-highlight:before,.line-highlight[data-end]:after{content:attr(data-start);position:absolute;top:.4em;left:.6em;min-width:1em;padding:0 .5em;background-color:hsla(24,20%,50%,.4);color:hsl(24,20%,95%);font:bold 65%/1.5 sans-serif;text-align:center;vertical-align:.3em;border-radius:999px;text-shadow:none;box-shadow:0 1px white}.line-highlight[data-end]:after{content:attr(data-end);top:auto;bottom:.4em}.line-numbers .line-highlight:before,.line-numbers .line-highlight:after{content:none}pre[class*="language-"].line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}pre[class*="language-"].line-numbers >code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows >span{pointer-events:none;display:block;counter-increment:linenumber}.line-numbers-rows >span:before{content:counter(linenumber);color:#999;display:block;padding-right:0.8em;text-align:right}div.code-toolbar{position:relative}div.code-toolbar >.toolbar{position:absolute;top:.3em;right:.2em;transition:opacity 0.3s ease-in-out;opacity:0}div.code-toolbar:hover >.toolbar{opacity:1}div.code-toolbar >.toolbar .toolbar-item{display:inline-block}div.code-toolbar >.toolbar a{cursor:pointer}div.code-toolbar >.toolbar button{background:none;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}div.code-toolbar >.toolbar a,div.code-toolbar >.toolbar button,div.code-toolbar >.toolbar span{color:#bbb;font-size:.8em;padding:0 .5em;background:#f5f2f0;background:rgba(224,224,224,0.2);box-shadow:0 2px 0 0 rgba(0,0,0,0.2);border-radius:.5em}div.code-toolbar >.toolbar a:hover,div.code-toolbar >.toolbar a:focus,div.code-toolbar >.toolbar button:hover,div.code-toolbar >.toolbar button:focus,div.code-toolbar >.toolbar span:hover,div.code-toolbar >.toolbar span:focus{color:inherit;text-decoration:none}
code[class*="language-"],pre[class*="language-"]{color:white;background:none;text-shadow:0 -.1em .2em black;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}@media print{code[class*="language-"],pre[class*="language-"]{text-shadow:none}}pre[class*="language-"],:not(pre) >code[class*="language-"]{background:hsl(30,20%,25%)}pre[class*="language-"]{padding:1em;margin:.5em 0;overflow:auto;border:.3em solid hsl(30,20%,40%);border-radius:.5em;box-shadow:1px 1px .5em black inset}:not(pre) >code[class*="language-"]{padding:.15em .2em .05em;border-radius:.3em;border:.13em solid hsl(30,20%,40%);box-shadow:1px 1px .3em -.1em black inset;white-space:normal}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:hsl(30,20%,50%)}.token.punctuation{opacity:.7}.namespace{opacity:.7}.token.property,.token.tag,.token.boolean,.token.number,.token.constant,.token.symbol{color:hsl(350,40%,70%)}.token.selector,.token.attr-name,.token.string,.token.char,.token.builtin,.token.inserted{color:hsl(75,70%,60%)}.token.operator,.token.entity,.token.url,.language-css .token.string,.style .token.string,.token.variable{color:hsl(40,90%,60%)}.token.atrule,.token.attr-value,.token.keyword{color:hsl(350,40%,70%)}.token.regex,.token.important{color:#e90}.token.important,.token.bold{font-weight:bold}.token.italic{font-style:italic}.token.entity{cursor:help}.token.deleted{color:red}pre[data-line]{position:relative;padding:1em 0 1em 3em}.line-highlight{position:absolute;left:0;right:0;padding:inherit 0;margin-top:1em;background:hsla(24,20%,50%,.08);background:linear-gradient(to right,hsla(24,20%,50%,.1) 70%,hsla(24,20%,50%,0));pointer-events:none;line-height:inherit;white-space:pre}.line-highlight:before,.line-highlight[data-end]:after{content:attr(data-start);position:absolute;top:.4em;left:.6em;min-width:1em;padding:0 .5em;background-color:hsla(24,20%,50%,.4);color:hsl(24,20%,95%);font:bold 65%/1.5 sans-serif;text-align:center;vertical-align:.3em;border-radius:999px;text-shadow:none;box-shadow:0 1px white}.line-highlight[data-end]:after{content:attr(data-end);top:auto;bottom:.4em}.line-numbers .line-highlight:before,.line-numbers .line-highlight:after{content:none}pre[class*="language-"].line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}pre[class*="language-"].line-numbers >code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows >span{pointer-events:none;display:block;counter-increment:linenumber}.line-numbers-rows >span:before{content:counter(linenumber);color:#999;display:block;padding-right:0.8em;text-align:right}div.code-toolbar{position:relative}div.code-toolbar >.toolbar{position:absolute;top:.3em;right:.2em;transition:opacity 0.3s ease-in-out;opacity:0}div.code-toolbar:hover >.toolbar{opacity:1}div.code-toolbar:focus-within >.toolbar{opacity:1}div.code-toolbar >.toolbar .toolbar-item{display:inline-block}div.code-toolbar >.toolbar a{cursor:pointer}div.code-toolbar >.toolbar button{background:none;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}div.code-toolbar >.toolbar a,div.code-toolbar >.toolbar button,div.code-toolbar >.toolbar span{color:#bbb;font-size:.8em;padding:0 .5em;background:#f5f2f0;background:rgba(224,224,224,0.2);box-shadow:0 2px 0 0 rgba(0,0,0,0.2);border-radius:.5em}div.code-toolbar >.toolbar a:hover,div.code-toolbar >.toolbar a:focus,div.code-toolbar >.toolbar button:hover,div.code-toolbar >.toolbar button:focus,div.code-toolbar >.toolbar span:hover,div.code-toolbar >.toolbar span:focus{color:inherit;text-decoration:none}

View File

@ -1 +1 @@
code[class*="language-"],pre[class*="language-"]{color:black;background:none;text-shadow:0 1px white;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*="language-"]::-moz-selection,pre[class*="language-"]::-moz-selection,code[class*="language-"]::-moz-selection,code[class*="language-"]::-moz-selection{text-shadow:none;background:#b3d4fc}pre[class*="language-"]::selection,pre[class*="language-"]::selection,code[class*="language-"]::selection,code[class*="language-"]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*="language-"],pre[class*="language-"]{text-shadow:none}}pre[class*="language-"]{padding:1em;margin:.5em 0;overflow:auto}:not(pre) >code[class*="language-"],pre[class*="language-"]{background:#f5f2f0}:not(pre) >code[class*="language-"]{padding:.1em;border-radius:.3em;white-space:normal}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:slategray}.token.punctuation{color:#999}.namespace{opacity:.7}.token.property,.token.tag,.token.boolean,.token.number,.token.constant,.token.symbol,.token.deleted{color:#905}.token.selector,.token.attr-name,.token.string,.token.char,.token.builtin,.token.inserted{color:#690}.token.operator,.token.entity,.token.url,.language-css .token.string,.style .token.string{color:#9a6e3a;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.function,.token.class-name{color:#DD4A68}.token.regex,.token.important,.token.variable{color:#e90}.token.important,.token.bold{font-weight:bold}.token.italic{font-style:italic}.token.entity{cursor:help}pre[data-line]{position:relative;padding:1em 0 1em 3em}.line-highlight{position:absolute;left:0;right:0;padding:inherit 0;margin-top:1em;background:hsla(24,20%,50%,.08);background:linear-gradient(to right,hsla(24,20%,50%,.1) 70%,hsla(24,20%,50%,0));pointer-events:none;line-height:inherit;white-space:pre}.line-highlight:before,.line-highlight[data-end]:after{content:attr(data-start);position:absolute;top:.4em;left:.6em;min-width:1em;padding:0 .5em;background-color:hsla(24,20%,50%,.4);color:hsl(24,20%,95%);font:bold 65%/1.5 sans-serif;text-align:center;vertical-align:.3em;border-radius:999px;text-shadow:none;box-shadow:0 1px white}.line-highlight[data-end]:after{content:attr(data-end);top:auto;bottom:.4em}.line-numbers .line-highlight:before,.line-numbers .line-highlight:after{content:none}pre[class*="language-"].line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}pre[class*="language-"].line-numbers >code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows >span{pointer-events:none;display:block;counter-increment:linenumber}.line-numbers-rows >span:before{content:counter(linenumber);color:#999;display:block;padding-right:0.8em;text-align:right}div.code-toolbar{position:relative}div.code-toolbar >.toolbar{position:absolute;top:.3em;right:.2em;transition:opacity 0.3s ease-in-out;opacity:0}div.code-toolbar:hover >.toolbar{opacity:1}div.code-toolbar >.toolbar .toolbar-item{display:inline-block}div.code-toolbar >.toolbar a{cursor:pointer}div.code-toolbar >.toolbar button{background:none;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}div.code-toolbar >.toolbar a,div.code-toolbar >.toolbar button,div.code-toolbar >.toolbar span{color:#bbb;font-size:.8em;padding:0 .5em;background:#f5f2f0;background:rgba(224,224,224,0.2);box-shadow:0 2px 0 0 rgba(0,0,0,0.2);border-radius:.5em}div.code-toolbar >.toolbar a:hover,div.code-toolbar >.toolbar a:focus,div.code-toolbar >.toolbar button:hover,div.code-toolbar >.toolbar button:focus,div.code-toolbar >.toolbar span:hover,div.code-toolbar >.toolbar span:focus{color:inherit;text-decoration:none}
code[class*="language-"],pre[class*="language-"]{color:black;background:none;text-shadow:0 1px white;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*="language-"]::-moz-selection,pre[class*="language-"]::-moz-selection,code[class*="language-"]::-moz-selection,code[class*="language-"]::-moz-selection{text-shadow:none;background:#b3d4fc}pre[class*="language-"]::selection,pre[class*="language-"]::selection,code[class*="language-"]::selection,code[class*="language-"]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*="language-"],pre[class*="language-"]{text-shadow:none}}pre[class*="language-"]{padding:1em;margin:.5em 0;overflow:auto}:not(pre) >code[class*="language-"],pre[class*="language-"]{background:#f5f2f0}:not(pre) >code[class*="language-"]{padding:.1em;border-radius:.3em;white-space:normal}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:slategray}.token.punctuation{color:#999}.namespace{opacity:.7}.token.property,.token.tag,.token.boolean,.token.number,.token.constant,.token.symbol,.token.deleted{color:#905}.token.selector,.token.attr-name,.token.string,.token.char,.token.builtin,.token.inserted{color:#690}.token.operator,.token.entity,.token.url,.language-css .token.string,.style .token.string{color:#9a6e3a;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.function,.token.class-name{color:#DD4A68}.token.regex,.token.important,.token.variable{color:#e90}.token.important,.token.bold{font-weight:bold}.token.italic{font-style:italic}.token.entity{cursor:help}pre[data-line]{position:relative;padding:1em 0 1em 3em}.line-highlight{position:absolute;left:0;right:0;padding:inherit 0;margin-top:1em;background:hsla(24,20%,50%,.08);background:linear-gradient(to right,hsla(24,20%,50%,.1) 70%,hsla(24,20%,50%,0));pointer-events:none;line-height:inherit;white-space:pre}.line-highlight:before,.line-highlight[data-end]:after{content:attr(data-start);position:absolute;top:.4em;left:.6em;min-width:1em;padding:0 .5em;background-color:hsla(24,20%,50%,.4);color:hsl(24,20%,95%);font:bold 65%/1.5 sans-serif;text-align:center;vertical-align:.3em;border-radius:999px;text-shadow:none;box-shadow:0 1px white}.line-highlight[data-end]:after{content:attr(data-end);top:auto;bottom:.4em}.line-numbers .line-highlight:before,.line-numbers .line-highlight:after{content:none}pre[class*="language-"].line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}pre[class*="language-"].line-numbers >code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows >span{pointer-events:none;display:block;counter-increment:linenumber}.line-numbers-rows >span:before{content:counter(linenumber);color:#999;display:block;padding-right:0.8em;text-align:right}div.code-toolbar{position:relative}div.code-toolbar >.toolbar{position:absolute;top:.3em;right:.2em;transition:opacity 0.3s ease-in-out;opacity:0}div.code-toolbar:hover >.toolbar{opacity:1}div.code-toolbar:focus-within >.toolbar{opacity:1}div.code-toolbar >.toolbar .toolbar-item{display:inline-block}div.code-toolbar >.toolbar a{cursor:pointer}div.code-toolbar >.toolbar button{background:none;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}div.code-toolbar >.toolbar a,div.code-toolbar >.toolbar button,div.code-toolbar >.toolbar span{color:#bbb;font-size:.8em;padding:0 .5em;background:#f5f2f0;background:rgba(224,224,224,0.2);box-shadow:0 2px 0 0 rgba(0,0,0,0.2);border-radius:.5em}div.code-toolbar >.toolbar a:hover,div.code-toolbar >.toolbar a:focus,div.code-toolbar >.toolbar button:hover,div.code-toolbar >.toolbar button:focus,div.code-toolbar >.toolbar span:hover,div.code-toolbar >.toolbar span:focus{color:inherit;text-decoration:none}

View File

@ -1 +1 @@
code[class*="language-"],pre[class*="language-"]{font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*="language-"]{padding:.4em .8em;margin:.5em 0;overflow:auto;background:url('data:image/svg+xml;charset=utf-8,<svg%20version%3D"1.1"%20xmlns%3D"http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg"%20width%3D"100"%20height%3D"100"%20fill%3D"rgba(0%2C0%2C0%2C.2)">%0D%0A<polygon%20points%3D"0%2C50%2050%2C0%200%2C0"%20%2F>%0D%0A<polygon%20points%3D"0%2C100%2050%2C100%20100%2C50%20100%2C0"%20%2F>%0D%0A<%2Fsvg>');background-size:1em 1em}code[class*="language-"]{background:black;color:white;box-shadow:-.3em 0 0 .3em black,.3em 0 0 .3em black}:not(pre) >code[class*="language-"]{padding:.2em;border-radius:.3em;box-shadow:none;white-space:normal}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:#aaa}.token.punctuation{color:#999}.namespace{opacity:.7}.token.property,.token.tag,.token.boolean,.token.number,.token.constant,.token.symbol{color:#0cf}.token.selector,.token.attr-name,.token.string,.token.char,.token.builtin{color:yellow}.token.operator,.token.entity,.token.url,.language-css .token.string,.toke.variable,.token.inserted{color:yellowgreen}.token.atrule,.token.attr-value,.token.keyword{color:deeppink}.token.regex,.token.important{color:orange}.token.important,.token.bold{font-weight:bold}.token.italic{font-style:italic}.token.entity{cursor:help}.token.deleted{color:red}pre[data-line]{position:relative;padding:1em 0 1em 3em}.line-highlight{position:absolute;left:0;right:0;padding:inherit 0;margin-top:1em;background:hsla(24,20%,50%,.08);background:linear-gradient(to right,hsla(24,20%,50%,.1) 70%,hsla(24,20%,50%,0));pointer-events:none;line-height:inherit;white-space:pre}.line-highlight:before,.line-highlight[data-end]:after{content:attr(data-start);position:absolute;top:.4em;left:.6em;min-width:1em;padding:0 .5em;background-color:hsla(24,20%,50%,.4);color:hsl(24,20%,95%);font:bold 65%/1.5 sans-serif;text-align:center;vertical-align:.3em;border-radius:999px;text-shadow:none;box-shadow:0 1px white}.line-highlight[data-end]:after{content:attr(data-end);top:auto;bottom:.4em}.line-numbers .line-highlight:before,.line-numbers .line-highlight:after{content:none}pre[class*="language-"].line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}pre[class*="language-"].line-numbers >code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows >span{pointer-events:none;display:block;counter-increment:linenumber}.line-numbers-rows >span:before{content:counter(linenumber);color:#999;display:block;padding-right:0.8em;text-align:right}div.code-toolbar{position:relative}div.code-toolbar >.toolbar{position:absolute;top:.3em;right:.2em;transition:opacity 0.3s ease-in-out;opacity:0}div.code-toolbar:hover >.toolbar{opacity:1}div.code-toolbar >.toolbar .toolbar-item{display:inline-block}div.code-toolbar >.toolbar a{cursor:pointer}div.code-toolbar >.toolbar button{background:none;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}div.code-toolbar >.toolbar a,div.code-toolbar >.toolbar button,div.code-toolbar >.toolbar span{color:#bbb;font-size:.8em;padding:0 .5em;background:#f5f2f0;background:rgba(224,224,224,0.2);box-shadow:0 2px 0 0 rgba(0,0,0,0.2);border-radius:.5em}div.code-toolbar >.toolbar a:hover,div.code-toolbar >.toolbar a:focus,div.code-toolbar >.toolbar button:hover,div.code-toolbar >.toolbar button:focus,div.code-toolbar >.toolbar span:hover,div.code-toolbar >.toolbar span:focus{color:inherit;text-decoration:none}
code[class*="language-"],pre[class*="language-"]{font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*="language-"]{padding:.4em .8em;margin:.5em 0;overflow:auto;background:url('data:image/svg+xml;charset=utf-8,<svg%20version%3D"1.1"%20xmlns%3D"http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg"%20width%3D"100"%20height%3D"100"%20fill%3D"rgba(0%2C0%2C0%2C.2)">%0D%0A<polygon%20points%3D"0%2C50%2050%2C0%200%2C0"%20%2F>%0D%0A<polygon%20points%3D"0%2C100%2050%2C100%20100%2C50%20100%2C0"%20%2F>%0D%0A<%2Fsvg>');background-size:1em 1em}code[class*="language-"]{background:black;color:white;box-shadow:-.3em 0 0 .3em black,.3em 0 0 .3em black}:not(pre) >code[class*="language-"]{padding:.2em;border-radius:.3em;box-shadow:none;white-space:normal}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:#aaa}.token.punctuation{color:#999}.namespace{opacity:.7}.token.property,.token.tag,.token.boolean,.token.number,.token.constant,.token.symbol{color:#0cf}.token.selector,.token.attr-name,.token.string,.token.char,.token.builtin{color:yellow}.token.operator,.token.entity,.token.url,.language-css .token.string,.token.variable,.token.inserted{color:yellowgreen}.token.atrule,.token.attr-value,.token.keyword{color:deeppink}.token.regex,.token.important{color:orange}.token.important,.token.bold{font-weight:bold}.token.italic{font-style:italic}.token.entity{cursor:help}.token.deleted{color:red}pre.diff-highlight.diff-highlight >code .token.deleted:not(.prefix),pre >code.diff-highlight.diff-highlight .token.deleted:not(.prefix){background-color:rgba(255,0,0,.3);display:inline}pre.diff-highlight.diff-highlight >code .token.inserted:not(.prefix),pre >code.diff-highlight.diff-highlight .token.inserted:not(.prefix){background-color:rgba(0,255,128,.3);display:inline}pre[data-line]{position:relative;padding:1em 0 1em 3em}.line-highlight{position:absolute;left:0;right:0;padding:inherit 0;margin-top:1em;background:hsla(24,20%,50%,.08);background:linear-gradient(to right,hsla(24,20%,50%,.1) 70%,hsla(24,20%,50%,0));pointer-events:none;line-height:inherit;white-space:pre}.line-highlight:before,.line-highlight[data-end]:after{content:attr(data-start);position:absolute;top:.4em;left:.6em;min-width:1em;padding:0 .5em;background-color:hsla(24,20%,50%,.4);color:hsl(24,20%,95%);font:bold 65%/1.5 sans-serif;text-align:center;vertical-align:.3em;border-radius:999px;text-shadow:none;box-shadow:0 1px white}.line-highlight[data-end]:after{content:attr(data-end);top:auto;bottom:.4em}.line-numbers .line-highlight:before,.line-numbers .line-highlight:after{content:none}pre[class*="language-"].line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}pre[class*="language-"].line-numbers >code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows >span{pointer-events:none;display:block;counter-increment:linenumber}.line-numbers-rows >span:before{content:counter(linenumber);color:#999;display:block;padding-right:0.8em;text-align:right}div.code-toolbar{position:relative}div.code-toolbar >.toolbar{position:absolute;top:.3em;right:.2em;transition:opacity 0.3s ease-in-out;opacity:0}div.code-toolbar:hover >.toolbar{opacity:1}div.code-toolbar:focus-within >.toolbar{opacity:1}div.code-toolbar >.toolbar .toolbar-item{display:inline-block}div.code-toolbar >.toolbar a{cursor:pointer}div.code-toolbar >.toolbar button{background:none;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}div.code-toolbar >.toolbar a,div.code-toolbar >.toolbar button,div.code-toolbar >.toolbar span{color:#bbb;font-size:.8em;padding:0 .5em;background:#f5f2f0;background:rgba(224,224,224,0.2);box-shadow:0 2px 0 0 rgba(0,0,0,0.2);border-radius:.5em}div.code-toolbar >.toolbar a:hover,div.code-toolbar >.toolbar a:focus,div.code-toolbar >.toolbar button:hover,div.code-toolbar >.toolbar button:focus,div.code-toolbar >.toolbar span:hover,div.code-toolbar >.toolbar span:focus{color:inherit;text-decoration:none}

View File

@ -1 +1 @@
code[class*="language-"],pre[class*="language-"]{color:#f8f8f2;background:none;text-shadow:0 1px rgba(0,0,0,0.3);font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*="language-"]{padding:1em;margin:.5em 0;overflow:auto;border-radius:0.3em}:not(pre) >code[class*="language-"],pre[class*="language-"]{background:#272822}:not(pre) >code[class*="language-"]{padding:.1em;border-radius:.3em;white-space:normal}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:slategray}.token.punctuation{color:#f8f8f2}.namespace{opacity:.7}.token.property,.token.tag,.token.constant,.token.symbol,.token.deleted{color:#f92672}.token.boolean,.token.number{color:#ae81ff}.token.selector,.token.attr-name,.token.string,.token.char,.token.builtin,.token.inserted{color:#a6e22e}.token.operator,.token.entity,.token.url,.language-css .token.string,.style .token.string,.token.variable{color:#f8f8f2}.token.atrule,.token.attr-value,.token.function,.token.class-name{color:#e6db74}.token.keyword{color:#66d9ef}.token.regex,.token.important{color:#fd971f}.token.important,.token.bold{font-weight:bold}.token.italic{font-style:italic}.token.entity{cursor:help}pre[data-line]{position:relative;padding:1em 0 1em 3em}.line-highlight{position:absolute;left:0;right:0;padding:inherit 0;margin-top:1em;background:hsla(24,20%,50%,.08);background:linear-gradient(to right,hsla(24,20%,50%,.1) 70%,hsla(24,20%,50%,0));pointer-events:none;line-height:inherit;white-space:pre}.line-highlight:before,.line-highlight[data-end]:after{content:attr(data-start);position:absolute;top:.4em;left:.6em;min-width:1em;padding:0 .5em;background-color:hsla(24,20%,50%,.4);color:hsl(24,20%,95%);font:bold 65%/1.5 sans-serif;text-align:center;vertical-align:.3em;border-radius:999px;text-shadow:none;box-shadow:0 1px white}.line-highlight[data-end]:after{content:attr(data-end);top:auto;bottom:.4em}.line-numbers .line-highlight:before,.line-numbers .line-highlight:after{content:none}pre[class*="language-"].line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}pre[class*="language-"].line-numbers >code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows >span{pointer-events:none;display:block;counter-increment:linenumber}.line-numbers-rows >span:before{content:counter(linenumber);color:#999;display:block;padding-right:0.8em;text-align:right}div.code-toolbar{position:relative}div.code-toolbar >.toolbar{position:absolute;top:.3em;right:.2em;transition:opacity 0.3s ease-in-out;opacity:0}div.code-toolbar:hover >.toolbar{opacity:1}div.code-toolbar >.toolbar .toolbar-item{display:inline-block}div.code-toolbar >.toolbar a{cursor:pointer}div.code-toolbar >.toolbar button{background:none;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}div.code-toolbar >.toolbar a,div.code-toolbar >.toolbar button,div.code-toolbar >.toolbar span{color:#bbb;font-size:.8em;padding:0 .5em;background:#f5f2f0;background:rgba(224,224,224,0.2);box-shadow:0 2px 0 0 rgba(0,0,0,0.2);border-radius:.5em}div.code-toolbar >.toolbar a:hover,div.code-toolbar >.toolbar a:focus,div.code-toolbar >.toolbar button:hover,div.code-toolbar >.toolbar button:focus,div.code-toolbar >.toolbar span:hover,div.code-toolbar >.toolbar span:focus{color:inherit;text-decoration:none}
code[class*="language-"],pre[class*="language-"]{color:#f8f8f2;background:none;text-shadow:0 1px rgba(0,0,0,0.3);font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*="language-"]{padding:1em;margin:.5em 0;overflow:auto;border-radius:0.3em}:not(pre) >code[class*="language-"],pre[class*="language-"]{background:#272822}:not(pre) >code[class*="language-"]{padding:.1em;border-radius:.3em;white-space:normal}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:slategray}.token.punctuation{color:#f8f8f2}.namespace{opacity:.7}.token.property,.token.tag,.token.constant,.token.symbol,.token.deleted{color:#f92672}.token.boolean,.token.number{color:#ae81ff}.token.selector,.token.attr-name,.token.string,.token.char,.token.builtin,.token.inserted{color:#a6e22e}.token.operator,.token.entity,.token.url,.language-css .token.string,.style .token.string,.token.variable{color:#f8f8f2}.token.atrule,.token.attr-value,.token.function,.token.class-name{color:#e6db74}.token.keyword{color:#66d9ef}.token.regex,.token.important{color:#fd971f}.token.important,.token.bold{font-weight:bold}.token.italic{font-style:italic}.token.entity{cursor:help}pre[data-line]{position:relative;padding:1em 0 1em 3em}.line-highlight{position:absolute;left:0;right:0;padding:inherit 0;margin-top:1em;background:hsla(24,20%,50%,.08);background:linear-gradient(to right,hsla(24,20%,50%,.1) 70%,hsla(24,20%,50%,0));pointer-events:none;line-height:inherit;white-space:pre}.line-highlight:before,.line-highlight[data-end]:after{content:attr(data-start);position:absolute;top:.4em;left:.6em;min-width:1em;padding:0 .5em;background-color:hsla(24,20%,50%,.4);color:hsl(24,20%,95%);font:bold 65%/1.5 sans-serif;text-align:center;vertical-align:.3em;border-radius:999px;text-shadow:none;box-shadow:0 1px white}.line-highlight[data-end]:after{content:attr(data-end);top:auto;bottom:.4em}.line-numbers .line-highlight:before,.line-numbers .line-highlight:after{content:none}pre[class*="language-"].line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}pre[class*="language-"].line-numbers >code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows >span{pointer-events:none;display:block;counter-increment:linenumber}.line-numbers-rows >span:before{content:counter(linenumber);color:#999;display:block;padding-right:0.8em;text-align:right}div.code-toolbar{position:relative}div.code-toolbar >.toolbar{position:absolute;top:.3em;right:.2em;transition:opacity 0.3s ease-in-out;opacity:0}div.code-toolbar:hover >.toolbar{opacity:1}div.code-toolbar:focus-within >.toolbar{opacity:1}div.code-toolbar >.toolbar .toolbar-item{display:inline-block}div.code-toolbar >.toolbar a{cursor:pointer}div.code-toolbar >.toolbar button{background:none;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}div.code-toolbar >.toolbar a,div.code-toolbar >.toolbar button,div.code-toolbar >.toolbar span{color:#bbb;font-size:.8em;padding:0 .5em;background:#f5f2f0;background:rgba(224,224,224,0.2);box-shadow:0 2px 0 0 rgba(0,0,0,0.2);border-radius:.5em}div.code-toolbar >.toolbar a:hover,div.code-toolbar >.toolbar a:focus,div.code-toolbar >.toolbar button:hover,div.code-toolbar >.toolbar button:focus,div.code-toolbar >.toolbar span:hover,div.code-toolbar >.toolbar span:focus{color:inherit;text-decoration:none}

View File

@ -1 +1 @@
code[class*="language-"],pre[class*="language-"]{color:#657b83;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*="language-"]::-moz-selection,pre[class*="language-"]::-moz-selection,code[class*="language-"]::-moz-selection,code[class*="language-"]::-moz-selection{background:#073642}pre[class*="language-"]::selection,pre[class*="language-"]::selection,code[class*="language-"]::selection,code[class*="language-"]::selection{background:#073642}pre[class*="language-"]{padding:1em;margin:.5em 0;overflow:auto;border-radius:0.3em}:not(pre) >code[class*="language-"],pre[class*="language-"]{background-color:#fdf6e3}:not(pre) >code[class*="language-"]{padding:.1em;border-radius:.3em}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:#93a1a1}.token.punctuation{color:#586e75}.namespace{opacity:.7}.token.property,.token.tag,.token.boolean,.token.number,.token.constant,.token.symbol,.token.deleted{color:#268bd2}.token.selector,.token.attr-name,.token.string,.token.char,.token.builtin,.token.url,.token.inserted{color:#2aa198}.token.entity{color:#657b83;background:#eee8d5}.token.atrule,.token.attr-value,.token.keyword{color:#859900}.token.function,.token.class-name{color:#b58900}.token.regex,.token.important,.token.variable{color:#cb4b16}.token.important,.token.bold{font-weight:bold}.token.italic{font-style:italic}.token.entity{cursor:help}pre[data-line]{position:relative;padding:1em 0 1em 3em}.line-highlight{position:absolute;left:0;right:0;padding:inherit 0;margin-top:1em;background:hsla(24,20%,50%,.08);background:linear-gradient(to right,hsla(24,20%,50%,.1) 70%,hsla(24,20%,50%,0));pointer-events:none;line-height:inherit;white-space:pre}.line-highlight:before,.line-highlight[data-end]:after{content:attr(data-start);position:absolute;top:.4em;left:.6em;min-width:1em;padding:0 .5em;background-color:hsla(24,20%,50%,.4);color:hsl(24,20%,95%);font:bold 65%/1.5 sans-serif;text-align:center;vertical-align:.3em;border-radius:999px;text-shadow:none;box-shadow:0 1px white}.line-highlight[data-end]:after{content:attr(data-end);top:auto;bottom:.4em}.line-numbers .line-highlight:before,.line-numbers .line-highlight:after{content:none}pre[class*="language-"].line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}pre[class*="language-"].line-numbers >code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows >span{pointer-events:none;display:block;counter-increment:linenumber}.line-numbers-rows >span:before{content:counter(linenumber);color:#999;display:block;padding-right:0.8em;text-align:right}div.code-toolbar{position:relative}div.code-toolbar >.toolbar{position:absolute;top:.3em;right:.2em;transition:opacity 0.3s ease-in-out;opacity:0}div.code-toolbar:hover >.toolbar{opacity:1}div.code-toolbar >.toolbar .toolbar-item{display:inline-block}div.code-toolbar >.toolbar a{cursor:pointer}div.code-toolbar >.toolbar button{background:none;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}div.code-toolbar >.toolbar a,div.code-toolbar >.toolbar button,div.code-toolbar >.toolbar span{color:#bbb;font-size:.8em;padding:0 .5em;background:#f5f2f0;background:rgba(224,224,224,0.2);box-shadow:0 2px 0 0 rgba(0,0,0,0.2);border-radius:.5em}div.code-toolbar >.toolbar a:hover,div.code-toolbar >.toolbar a:focus,div.code-toolbar >.toolbar button:hover,div.code-toolbar >.toolbar button:focus,div.code-toolbar >.toolbar span:hover,div.code-toolbar >.toolbar span:focus{color:inherit;text-decoration:none}
code[class*="language-"],pre[class*="language-"]{color:#657b83;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*="language-"]::-moz-selection,pre[class*="language-"]::-moz-selection,code[class*="language-"]::-moz-selection,code[class*="language-"]::-moz-selection{background:#073642}pre[class*="language-"]::selection,pre[class*="language-"]::selection,code[class*="language-"]::selection,code[class*="language-"]::selection{background:#073642}pre[class*="language-"]{padding:1em;margin:.5em 0;overflow:auto;border-radius:0.3em}:not(pre) >code[class*="language-"],pre[class*="language-"]{background-color:#fdf6e3}:not(pre) >code[class*="language-"]{padding:.1em;border-radius:.3em}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:#93a1a1}.token.punctuation{color:#586e75}.namespace{opacity:.7}.token.property,.token.tag,.token.boolean,.token.number,.token.constant,.token.symbol,.token.deleted{color:#268bd2}.token.selector,.token.attr-name,.token.string,.token.char,.token.builtin,.token.url,.token.inserted{color:#2aa198}.token.entity{color:#657b83;background:#eee8d5}.token.atrule,.token.attr-value,.token.keyword{color:#859900}.token.function,.token.class-name{color:#b58900}.token.regex,.token.important,.token.variable{color:#cb4b16}.token.important,.token.bold{font-weight:bold}.token.italic{font-style:italic}.token.entity{cursor:help}pre[data-line]{position:relative;padding:1em 0 1em 3em}.line-highlight{position:absolute;left:0;right:0;padding:inherit 0;margin-top:1em;background:hsla(24,20%,50%,.08);background:linear-gradient(to right,hsla(24,20%,50%,.1) 70%,hsla(24,20%,50%,0));pointer-events:none;line-height:inherit;white-space:pre}.line-highlight:before,.line-highlight[data-end]:after{content:attr(data-start);position:absolute;top:.4em;left:.6em;min-width:1em;padding:0 .5em;background-color:hsla(24,20%,50%,.4);color:hsl(24,20%,95%);font:bold 65%/1.5 sans-serif;text-align:center;vertical-align:.3em;border-radius:999px;text-shadow:none;box-shadow:0 1px white}.line-highlight[data-end]:after{content:attr(data-end);top:auto;bottom:.4em}.line-numbers .line-highlight:before,.line-numbers .line-highlight:after{content:none}pre[class*="language-"].line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}pre[class*="language-"].line-numbers >code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows >span{pointer-events:none;display:block;counter-increment:linenumber}.line-numbers-rows >span:before{content:counter(linenumber);color:#999;display:block;padding-right:0.8em;text-align:right}div.code-toolbar{position:relative}div.code-toolbar >.toolbar{position:absolute;top:.3em;right:.2em;transition:opacity 0.3s ease-in-out;opacity:0}div.code-toolbar:hover >.toolbar{opacity:1}div.code-toolbar:focus-within >.toolbar{opacity:1}div.code-toolbar >.toolbar .toolbar-item{display:inline-block}div.code-toolbar >.toolbar a{cursor:pointer}div.code-toolbar >.toolbar button{background:none;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}div.code-toolbar >.toolbar a,div.code-toolbar >.toolbar button,div.code-toolbar >.toolbar span{color:#bbb;font-size:.8em;padding:0 .5em;background:#f5f2f0;background:rgba(224,224,224,0.2);box-shadow:0 2px 0 0 rgba(0,0,0,0.2);border-radius:.5em}div.code-toolbar >.toolbar a:hover,div.code-toolbar >.toolbar a:focus,div.code-toolbar >.toolbar button:hover,div.code-toolbar >.toolbar button:focus,div.code-toolbar >.toolbar span:hover,div.code-toolbar >.toolbar span:focus{color:inherit;text-decoration:none}

View File

@ -1 +1 @@
code[class*="language-"],pre[class*="language-"]{color:#ccc;background:none;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*="language-"]{padding:1em;margin:.5em 0;overflow:auto}:not(pre) >code[class*="language-"],pre[class*="language-"]{background:#2d2d2d}:not(pre) >code[class*="language-"]{padding:.1em;border-radius:.3em;white-space:normal}.token.comment,.token.block-comment,.token.prolog,.token.doctype,.token.cdata{color:#999}.token.punctuation{color:#ccc}.token.tag,.token.attr-name,.token.namespace,.token.deleted{color:#e2777a}.token.function-name{color:#6196cc}.token.boolean,.token.number,.token.function{color:#f08d49}.token.property,.token.class-name,.token.constant,.token.symbol{color:#f8c555}.token.selector,.token.important,.token.atrule,.token.keyword,.token.builtin{color:#cc99cd}.token.string,.token.char,.token.attr-value,.token.regex,.token.variable{color:#7ec699}.token.operator,.token.entity,.token.url{color:#67cdcc}.token.important,.token.bold{font-weight:bold}.token.italic{font-style:italic}.token.entity{cursor:help}.token.inserted{color:green}pre[data-line]{position:relative;padding:1em 0 1em 3em}.line-highlight{position:absolute;left:0;right:0;padding:inherit 0;margin-top:1em;background:hsla(24,20%,50%,.08);background:linear-gradient(to right,hsla(24,20%,50%,.1) 70%,hsla(24,20%,50%,0));pointer-events:none;line-height:inherit;white-space:pre}.line-highlight:before,.line-highlight[data-end]:after{content:attr(data-start);position:absolute;top:.4em;left:.6em;min-width:1em;padding:0 .5em;background-color:hsla(24,20%,50%,.4);color:hsl(24,20%,95%);font:bold 65%/1.5 sans-serif;text-align:center;vertical-align:.3em;border-radius:999px;text-shadow:none;box-shadow:0 1px white}.line-highlight[data-end]:after{content:attr(data-end);top:auto;bottom:.4em}.line-numbers .line-highlight:before,.line-numbers .line-highlight:after{content:none}pre[class*="language-"].line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}pre[class*="language-"].line-numbers >code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows >span{pointer-events:none;display:block;counter-increment:linenumber}.line-numbers-rows >span:before{content:counter(linenumber);color:#999;display:block;padding-right:0.8em;text-align:right}div.code-toolbar{position:relative}div.code-toolbar >.toolbar{position:absolute;top:.3em;right:.2em;transition:opacity 0.3s ease-in-out;opacity:0}div.code-toolbar:hover >.toolbar{opacity:1}div.code-toolbar >.toolbar .toolbar-item{display:inline-block}div.code-toolbar >.toolbar a{cursor:pointer}div.code-toolbar >.toolbar button{background:none;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}div.code-toolbar >.toolbar a,div.code-toolbar >.toolbar button,div.code-toolbar >.toolbar span{color:#bbb;font-size:.8em;padding:0 .5em;background:#f5f2f0;background:rgba(224,224,224,0.2);box-shadow:0 2px 0 0 rgba(0,0,0,0.2);border-radius:.5em}div.code-toolbar >.toolbar a:hover,div.code-toolbar >.toolbar a:focus,div.code-toolbar >.toolbar button:hover,div.code-toolbar >.toolbar button:focus,div.code-toolbar >.toolbar span:hover,div.code-toolbar >.toolbar span:focus{color:inherit;text-decoration:none}
code[class*="language-"],pre[class*="language-"]{color:#ccc;background:none;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*="language-"]{padding:1em;margin:.5em 0;overflow:auto}:not(pre) >code[class*="language-"],pre[class*="language-"]{background:#2d2d2d}:not(pre) >code[class*="language-"]{padding:.1em;border-radius:.3em;white-space:normal}.token.comment,.token.block-comment,.token.prolog,.token.doctype,.token.cdata{color:#999}.token.punctuation{color:#ccc}.token.tag,.token.attr-name,.token.namespace,.token.deleted{color:#e2777a}.token.function-name{color:#6196cc}.token.boolean,.token.number,.token.function{color:#f08d49}.token.property,.token.class-name,.token.constant,.token.symbol{color:#f8c555}.token.selector,.token.important,.token.atrule,.token.keyword,.token.builtin{color:#cc99cd}.token.string,.token.char,.token.attr-value,.token.regex,.token.variable{color:#7ec699}.token.operator,.token.entity,.token.url{color:#67cdcc}.token.important,.token.bold{font-weight:bold}.token.italic{font-style:italic}.token.entity{cursor:help}.token.inserted{color:green}pre[data-line]{position:relative;padding:1em 0 1em 3em}.line-highlight{position:absolute;left:0;right:0;padding:inherit 0;margin-top:1em;background:hsla(24,20%,50%,.08);background:linear-gradient(to right,hsla(24,20%,50%,.1) 70%,hsla(24,20%,50%,0));pointer-events:none;line-height:inherit;white-space:pre}.line-highlight:before,.line-highlight[data-end]:after{content:attr(data-start);position:absolute;top:.4em;left:.6em;min-width:1em;padding:0 .5em;background-color:hsla(24,20%,50%,.4);color:hsl(24,20%,95%);font:bold 65%/1.5 sans-serif;text-align:center;vertical-align:.3em;border-radius:999px;text-shadow:none;box-shadow:0 1px white}.line-highlight[data-end]:after{content:attr(data-end);top:auto;bottom:.4em}.line-numbers .line-highlight:before,.line-numbers .line-highlight:after{content:none}pre[class*="language-"].line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}pre[class*="language-"].line-numbers >code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows >span{pointer-events:none;display:block;counter-increment:linenumber}.line-numbers-rows >span:before{content:counter(linenumber);color:#999;display:block;padding-right:0.8em;text-align:right}div.code-toolbar{position:relative}div.code-toolbar >.toolbar{position:absolute;top:.3em;right:.2em;transition:opacity 0.3s ease-in-out;opacity:0}div.code-toolbar:hover >.toolbar{opacity:1}div.code-toolbar:focus-within >.toolbar{opacity:1}div.code-toolbar >.toolbar .toolbar-item{display:inline-block}div.code-toolbar >.toolbar a{cursor:pointer}div.code-toolbar >.toolbar button{background:none;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}div.code-toolbar >.toolbar a,div.code-toolbar >.toolbar button,div.code-toolbar >.toolbar span{color:#bbb;font-size:.8em;padding:0 .5em;background:#f5f2f0;background:rgba(224,224,224,0.2);box-shadow:0 2px 0 0 rgba(0,0,0,0.2);border-radius:.5em}div.code-toolbar >.toolbar a:hover,div.code-toolbar >.toolbar a:focus,div.code-toolbar >.toolbar button:hover,div.code-toolbar >.toolbar button:focus,div.code-toolbar >.toolbar span:hover,div.code-toolbar >.toolbar span:focus{color:inherit;text-decoration:none}

File diff suppressed because one or more lines are too long

6
lib/prism/js/lang-tsx.js Normal file
View File

@ -0,0 +1,6 @@
Prism.languages.markup={comment:/<!--[\s\S]*?-->/,prolog:/<\?[\s\S]+?\?>/,doctype:/<!DOCTYPE[\s\S]+?>/i,cdata:/<!\[CDATA\[[\s\S]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&amp;/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^<!\[CDATA\[|\]\]>$/i;var n={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:s}};n["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var i={};i[a]={pattern:RegExp("(<__[\\s\\S]*?>)(?:<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\s*|[\\s\\S])*?(?=<\\/__>)".replace(/__/g,a),"i"),lookbehind:!0,greedy:!0,inside:n},Prism.languages.insertBefore("markup","cdata",i)}}),Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup;
Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};
Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<<?=?|>>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript;
Prism.languages.typescript=Prism.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/}),Prism.languages.ts=Prism.languages.typescript;
!function(i){var t=i.util.clone(i.languages.javascript);i.languages.jsx=i.languages.extend("markup",t),i.languages.jsx.tag.pattern=/<\/?(?:[\w.:-]+\s*(?:\s+(?:[\w.:-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}))*\s*\/?)?>/i,i.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,i.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i,i.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,i.languages.insertBefore("inside","attr-name",{spread:{pattern:/\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}/,inside:{punctuation:/\.{3}|[{}.]/,"attr-value":/\w+/}}},i.languages.jsx.tag),i.languages.insertBefore("inside","attr-value",{script:{pattern:/=(\{(?:\{(?:\{[^}]*\}|[^}])*\}|[^}])+\})/i,inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:i.languages.jsx},alias:"language-javascript"}},i.languages.jsx.tag);var o=function(t){return t?"string"==typeof t?t:"string"==typeof t.content?t.content:t.content.map(o).join(""):""},p=function(t){for(var n=[],e=0;e<t.length;e++){var a=t[e],s=!1;if("string"!=typeof a&&("tag"===a.type&&a.content[0]&&"tag"===a.content[0].type?"</"===a.content[0].content[0].content?0<n.length&&n[n.length-1].tagName===o(a.content[0].content[1])&&n.pop():"/>"===a.content[a.content.length-1].content||n.push({tagName:o(a.content[0].content[1]),openedBraces:0}):0<n.length&&"punctuation"===a.type&&"{"===a.content?n[n.length-1].openedBraces++:0<n.length&&0<n[n.length-1].openedBraces&&"punctuation"===a.type&&"}"===a.content?n[n.length-1].openedBraces--:s=!0),(s||"string"==typeof a)&&0<n.length&&0===n[n.length-1].openedBraces){var g=o(a);e<t.length-1&&("string"==typeof t[e+1]||"plain-text"===t[e+1].type)&&(g+=o(t[e+1]),t.splice(e+1,1)),0<e&&("string"==typeof t[e-1]||"plain-text"===t[e-1].type)&&(g=o(t[e-1])+g,t.splice(e-1,1),e--),t[e]=new i.Token("plain-text",g,null,g)}a.content&&"string"!=typeof a.content&&p(a.content)}};i.hooks.add("after-tokenize",function(t){"jsx"!==t.language&&"tsx"!==t.language||p(t.tokens)})}(Prism);
var typescript=Prism.util.clone(Prism.languages.typescript);Prism.languages.tsx=Prism.languages.extend("jsx",typescript);

View File

@ -1 +1 @@
!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector){var t,h=function(){if(void 0===t){var e=document.createElement("div");e.style.fontSize="13px",e.style.lineHeight="1.5",e.style.padding=0,e.style.border=0,e.innerHTML="&nbsp;<br />&nbsp;",document.body.appendChild(e),t=38===e.offsetHeight,document.body.removeChild(e)}return t},l=0;Prism.hooks.add("before-sanity-check",function(e){var t=e.element.parentNode,n=t&&t.getAttribute("data-line");if(t&&n&&/pre/i.test(t.nodeName)){var i=0;r(".line-highlight",t).forEach(function(e){i+=e.textContent.length,e.parentNode.removeChild(e)}),i&&/^( \n)+$/.test(e.code.slice(-i))&&(e.code=e.code.slice(0,-i))}}),Prism.hooks.add("complete",function e(t){var n=t.element.parentNode,i=n&&n.getAttribute("data-line");if(n&&i&&/pre/i.test(n.nodeName)){clearTimeout(l);var r=Prism.plugins.lineNumbers,o=t.plugins&&t.plugins.lineNumbers;g(n,"line-numbers")&&r&&!o?Prism.hooks.add("line-numbers",e):(a(n,i),l=setTimeout(s,1))}}),window.addEventListener("hashchange",s),window.addEventListener("resize",function(){var e=document.querySelectorAll("pre[data-line]");Array.prototype.forEach.call(e,function(e){a(e)})})}function r(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function g(e,t){return t=" "+t+" ",-1<(" "+e.className+" ").replace(/[\n\t]/g," ").indexOf(t)}function a(e,t,n){for(var i,r=(t="string"==typeof t?t:e.getAttribute("data-line")).replace(/\s+/g,"").split(","),o=+e.getAttribute("data-line-offset")||0,l=(h()?parseInt:parseFloat)(getComputedStyle(e).lineHeight),a=g(e,"line-numbers"),s=0;i=r[s++];){var d=i.split("-"),u=+d[0],c=+d[1]||u,m=e.querySelector('.line-highlight[data-range="'+i+'"]')||document.createElement("div");if(m.setAttribute("aria-hidden","true"),m.setAttribute("data-range",i),m.className=(n||"")+" line-highlight",a&&Prism.plugins.lineNumbers){var p=Prism.plugins.lineNumbers.getLine(e,u),f=Prism.plugins.lineNumbers.getLine(e,c);p&&(m.style.top=p.offsetTop+"px"),f&&(m.style.height=f.offsetTop-p.offsetTop+f.offsetHeight+"px")}else m.setAttribute("data-start",u),u<c&&m.setAttribute("data-end",c),m.style.top=(u-o-1)*l+"px",m.textContent=new Array(c-u+2).join(" \n");a?e.appendChild(m):(e.querySelector("code")||e).appendChild(m)}}function s(){var e=location.hash.slice(1);r(".temporary.line-highlight").forEach(function(e){e.parentNode.removeChild(e)});var t=(e.match(/\.([\d,-]+)$/)||[,""])[1];if(t&&!document.getElementById(e)){var n=e.slice(0,e.lastIndexOf(".")),i=document.getElementById(n);i&&(i.hasAttribute("data-line")||i.setAttribute("data-line",""),a(i,t,"temporary "),document.querySelector(".temporary.line-highlight").scrollIntoView())}}}();
!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector){var t,n=function(){if(void 0===t){var e=document.createElement("div");e.style.fontSize="13px",e.style.lineHeight="1.5",e.style.padding=0,e.style.border=0,e.innerHTML="&nbsp;<br />&nbsp;",document.body.appendChild(e),t=38===e.offsetHeight,document.body.removeChild(e)}return t},a=0;Prism.hooks.add("before-sanity-check",function(e){var t=e.element.parentNode,n=t&&t.getAttribute("data-line");if(t&&n&&/pre/i.test(t.nodeName)){var i=0;r(".line-highlight",t).forEach(function(e){i+=e.textContent.length,e.parentNode.removeChild(e)}),i&&/^( \n)+$/.test(e.code.slice(-i))&&(e.code=e.code.slice(0,-i))}}),Prism.hooks.add("complete",function e(t){var n=t.element.parentNode,i=n&&n.getAttribute("data-line");if(n&&i&&/pre/i.test(n.nodeName)){clearTimeout(a);var r=Prism.plugins.lineNumbers,o=t.plugins&&t.plugins.lineNumbers;if(l(n,"line-numbers")&&r&&!o)Prism.hooks.add("line-numbers",e);else s(n,i)(),a=setTimeout(u,1)}}),window.addEventListener("hashchange",u),window.addEventListener("resize",function(){var t=[];r("pre[data-line]").forEach(function(e){t.push(s(e))}),t.forEach(i)})}function r(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function l(e,t){return t=" "+t+" ",-1<(" "+e.className+" ").replace(/[\n\t]/g," ").indexOf(t)}function i(e){e()}function s(u,e,d){var t=(e="string"==typeof e?e:u.getAttribute("data-line")).replace(/\s+/g,"").split(","),c=+u.getAttribute("data-line-offset")||0,f=(n()?parseInt:parseFloat)(getComputedStyle(u).lineHeight),h=l(u,"line-numbers"),p=h?u:u.querySelector("code")||u,m=[];return t.forEach(function(e){var t=e.split("-"),n=+t[0],i=+t[1]||n,r=u.querySelector('.line-highlight[data-range="'+e+'"]')||document.createElement("div");if(m.push(function(){r.setAttribute("aria-hidden","true"),r.setAttribute("data-range",e),r.className=(d||"")+" line-highlight"}),h&&Prism.plugins.lineNumbers){var o=Prism.plugins.lineNumbers.getLine(u,n),a=Prism.plugins.lineNumbers.getLine(u,i);if(o){var l=o.offsetTop+"px";m.push(function(){r.style.top=l})}if(a){var s=a.offsetTop-o.offsetTop+a.offsetHeight+"px";m.push(function(){r.style.height=s})}}else m.push(function(){r.setAttribute("data-start",n),n<i&&r.setAttribute("data-end",i),r.style.top=(n-c-1)*f+"px",r.textContent=new Array(i-n+2).join(" \n")});m.push(function(){p.appendChild(r)})}),function(){m.forEach(i)}}function u(){var e=location.hash.slice(1);r(".temporary.line-highlight").forEach(function(e){e.parentNode.removeChild(e)});var t=(e.match(/\.([\d,-]+)$/)||[,""])[1];if(t&&!document.getElementById(e)){var n=e.slice(0,e.lastIndexOf(".")),i=document.getElementById(n);if(i)i.hasAttribute("data-line")||i.setAttribute("data-line",""),s(i,t,"temporary ")(),document.querySelector(".temporary.line-highlight").scrollIntoView()}}}();

View File

@ -1,2 +1,2 @@
!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var r=[],i={},n=function(){};Prism.plugins.toolbar={};var t=Prism.plugins.toolbar.registerButton=function(t,n){var e;e="function"==typeof n?n:function(t){var e;return"function"==typeof n.onClick?((e=document.createElement("button")).type="button",e.addEventListener("click",function(){n.onClick.call(this,t)})):"string"==typeof n.url?(e=document.createElement("a")).href=n.url:e=document.createElement("span"),e.textContent=n.text,e},t in i?console.warn('There is a button with the key "'+t+'" registered already.'):r.push(i[t]=e)},e=Prism.plugins.toolbar.hook=function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)&&!t.parentNode.classList.contains("code-toolbar")){var e=document.createElement("div");e.classList.add("code-toolbar"),t.parentNode.insertBefore(e,t),e.appendChild(t);var o=document.createElement("div");o.classList.add("toolbar"),document.body.hasAttribute("data-toolbar-order")&&(r=document.body.getAttribute("data-toolbar-order").split(",").map(function(t){return i[t]||n})),r.forEach(function(t){var e=t(a);if(e){var n=document.createElement("div");n.classList.add("toolbar-item"),n.appendChild(e),o.appendChild(n)}}),e.appendChild(o)}};t("label",function(t){var e=t.element.parentNode;if(e&&/pre/i.test(e.nodeName)&&e.hasAttribute("data-label")){var n,a,o=e.getAttribute("data-label");try{a=document.querySelector("template#"+o)}catch(t){}return a?n=a.content:(e.hasAttribute("data-url")?(n=document.createElement("a")).href=e.getAttribute("data-url"):n=document.createElement("span"),n.textContent=o),n}}),Prism.hooks.add("complete",e)}}();
!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var r={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented BackusNaur form",apacheconf:"Apache Configuration",apl:"APL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Bash",basic:"BASIC",bnf:"BackusNaur form",rbnf:"Routing BackusNaur form",csharp:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",coffee:"CoffeeScript",cmake:"CMake",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",jinja2:"Django/Jinja2",dockerfile:"Docker",ebnf:"Extended BackusNaur form",ejs:"EJS",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",py:"Python",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",ts:"TypeScript","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s,t=a.getAttribute("data-language")||r[e.language]||((s=e.language)?(s.substring(0,1).toUpperCase()+s.substring(1)).replace(/s(?=cript)/,"S"):s);if(t){var o=document.createElement("span");return o.textContent=t,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}();
!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var r=[],i={},a=function(){};Prism.plugins.toolbar={};var t=Prism.plugins.toolbar.registerButton=function(t,a){var e;e="function"==typeof a?a:function(t){var e;return"function"==typeof a.onClick?((e=document.createElement("button")).type="button",e.addEventListener("click",function(){a.onClick.call(this,t)})):"string"==typeof a.url?(e=document.createElement("a")).href=a.url:e=document.createElement("span"),a.className&&e.classList.add(a.className),e.textContent=a.text,e},t in i?console.warn('There is a button with the key "'+t+'" registered already.'):r.push(i[t]=e)},e=Prism.plugins.toolbar.hook=function(n){var t=n.element.parentNode;if(t&&/pre/i.test(t.nodeName)&&!t.parentNode.classList.contains("code-toolbar")){var e=document.createElement("div");e.classList.add("code-toolbar"),t.parentNode.insertBefore(e,t),e.appendChild(t);var o=document.createElement("div");o.classList.add("toolbar"),document.body.hasAttribute("data-toolbar-order")&&(r=document.body.getAttribute("data-toolbar-order").split(",").map(function(t){return i[t]||a})),r.forEach(function(t){var e=t(n);if(e){var a=document.createElement("div");a.classList.add("toolbar-item"),a.appendChild(e),o.appendChild(a)}}),e.appendChild(o)}};t("label",function(t){var e=t.element.parentNode;if(e&&/pre/i.test(e.nodeName)&&e.hasAttribute("data-label")){var a,n,o=e.getAttribute("data-label");try{n=document.querySelector("template#"+o)}catch(t){}return n?a=n.content:(e.hasAttribute("data-url")?(a=document.createElement("a")).href=e.getAttribute("data-url"):a=document.createElement("span"),a.textContent=o),a}}),Prism.hooks.add("complete",e)}}();
!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var i={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented BackusNaur form",apacheconf:"Apache Configuration",apl:"APL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Bash",basic:"BASIC",bnf:"BackusNaur form",rbnf:"Routing BackusNaur form",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",coffee:"CoffeeScript",cmake:"CMake",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",ebnf:"Extended BackusNaur form",ejs:"EJS",erb:"ERB",fsharp:"F#","firestore-security-rules":"Firestore security rules",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras","js-templates":"JS Templates",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",py:"Python",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session",soy:"Soy (Closure Template)","splunk-spl":"Splunk SPL",sql:"SQL",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",trig:"TriG",ts:"TypeScript","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s,t=a.getAttribute("data-language")||i[e.language]||((s=e.language)?(s.substring(0,1).toUpperCase()+s.substring(1)).replace(/s(?=cript)/,"S"):s);if(t){var o=document.createElement("span");return o.textContent=t,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}();

File diff suppressed because one or more lines are too long

View File

@ -10,8 +10,8 @@
Donate link: https://monzillamedia.com/donate.html
Requires at least: 4.1
Tested up to: 5.2
Stable tag: 2.1
Version: 2.1
Stable tag: 2.2
Version: 2.2
Requires PHP: 5.6.20
Text Domain: prismatic
Domain Path: /languages
@ -57,14 +57,18 @@ if (!class_exists('Prismatic')) {
add_filter('plugin_action_links', array(self::$instance, 'action_links'), 10, 2);
add_filter('plugin_row_meta', array(self::$instance, 'plugin_links'), 10, 2);
add_action('wp_enqueue_scripts', 'prismatic_enqueue');
add_action('admin_enqueue_scripts', 'prismatic_enqueue');
add_action('admin_enqueue_scripts', 'prismatic_enqueue_settings');
add_action('admin_notices', 'prismatic_admin_notice');
add_action('admin_menu', 'prismatic_menu_pages');
add_action('admin_init', 'prismatic_register_settings');
add_action('admin_init', 'prismatic_reset_options');
add_action('wp_enqueue_scripts', 'prismatic_enqueue');
add_action('admin_enqueue_scripts', 'prismatic_enqueue');
add_action('admin_enqueue_scripts', 'prismatic_enqueue_settings');
add_action('admin_enqueue_scripts', 'prismatic_enqueue_buttons');
add_action('admin_print_footer_scripts', 'prismatic_add_quicktags');
add_action('admin_notices', 'prismatic_admin_notice');
add_action('admin_menu', 'prismatic_menu_pages');
add_action('admin_init', 'prismatic_register_settings');
add_action('admin_init', 'prismatic_reset_options');
add_action('admin_init', 'prismatic_buttons');
add_action('init', 'prismatic_register_block_assets');
add_action('init', 'prismatic_add_filters');
}
@ -137,7 +141,7 @@ if (!class_exists('Prismatic')) {
private function constants() {
if (!defined('PRISMATIC_VERSION')) define('PRISMATIC_VERSION', '2.1');
if (!defined('PRISMATIC_VERSION')) define('PRISMATIC_VERSION', '2.2');
if (!defined('PRISMATIC_REQUIRE')) define('PRISMATIC_REQUIRE', '4.1');
if (!defined('PRISMATIC_NAME')) define('PRISMATIC_NAME', 'Prismatic');
if (!defined('PRISMATIC_AUTHOR')) define('PRISMATIC_AUTHOR', 'Jeff Starr');
@ -151,6 +155,8 @@ if (!class_exists('Prismatic')) {
private function includes() {
require_once PRISMATIC_DIR .'inc/prismatic-blocks.php';
require_once PRISMATIC_DIR .'inc/prismatic-buttons.php';
require_once PRISMATIC_DIR .'inc/prismatic-core.php';
require_once PRISMATIC_DIR .'inc/resources-enqueue.php';
require_once PRISMATIC_DIR .'inc/settings-callbacks.php';

View File

@ -10,8 +10,8 @@ Author URI: https://plugin-planet.com/
Donate link: https://monzillamedia.com/donate.html
Requires at least: 4.1
Tested up to: 5.2
Stable tag: 2.1
Version: 2.1
Stable tag: 2.2
Version: 2.2
Requires PHP: 5.6.20
Text Domain: prismatic
Domain Path: /languages
@ -27,7 +27,7 @@ __The only 3-in-1 syntax highlighter!__
Display beautiful code snippets with Prism.js, Highlight.js, or plain code escaping:
* __Prism.js__ - Code escape + syntax highlight using [Prism.js](http://prismjs.com/)
* __Prism.js__ - Code escape + syntax highlight using [Prism.js](https://prismjs.com/)
* __Highlight.js__ - Code escape + syntax highlight using [Highlight.js](https://highlightjs.org/)
* __Plain Flavor__ - Code escape without syntax highlight
@ -36,11 +36,13 @@ Check out a [demo post using Highlight.js](https://dev-tricks.com/favorite-highl
**Prism.js Features**
* Supports __46__ coding languages
* Supports __47__ coding languages
* Choose from all __8__ available Prism themes
* Enable Prism plugin [Line Numbers](http://prismjs.com/plugins/line-numbers/)
* Enable Prism plugin [Line Highlight](http://prismjs.com/plugins/line-highlight/)
* Enable Prism plugin [Show Language](http://prismjs.com/plugins/show-language/)
* Provides a Gutenberg block for adding code snippets
* Provides TinyMCE/Visual buttons for adding code snippets
* Enable Prism plugin [Line Numbers](https://prismjs.com/plugins/line-numbers/)
* Enable Prism plugin [Line Highlight](https://prismjs.com/plugins/line-highlight/)
* Enable Prism plugin [Show Language](https://prismjs.com/plugins/show-language/)
* Highlights code in post content, excerpts, and comments
* Detects `language-` and `lang-` class prefixes
* Limit syntax highlighting to Posts and Pages
@ -50,8 +52,10 @@ Check out a [demo post using Highlight.js](https://dev-tricks.com/favorite-highl
**Highlight.js Features**
* Supports __36__ coding languages
* Supports __37__ coding languages
* Choose from all __90+__ available Highlight themes
* Provides a Gutenberg block for adding code snippets
* Provides TinyMCE/Visual buttons for adding code snippets
* Customize the Highlight.js init JavaScript
* Highlights code in post content, excerpts, and comments
* Limit syntax highlighting to Posts and Pages
@ -65,8 +69,10 @@ Check out a [demo post using Highlight.js](https://dev-tricks.com/favorite-highl
* Enable code escaping for post content, excerpts, and/or comments
* Enable code escaping on the frontend, Admin Area, or both
* Provides a Gutenberg block for adding code snippets
* Provides TinyMCE/Visual buttons for adding code snippets
* Escapes single-line and multi-line code snippets
* Escapes `<code>` tags based on configuration
* Escapes `<code>` tags (based on configuration)
**General Features**
@ -93,15 +99,18 @@ This plugin does not collect or store any user data. It does not set any cookies
== Screenshots ==
1. Prismatic General Settings
2. Prismatic Prism.js Settings
3. Prismatic Highlight.js Settings
4. Prismatic Plain Flavor Settings
5. Prism.js : Twilight theme (choose from 7 Prism.js themes!)
6. Highlight.js : Arduino Light theme (choose from 77 Highlight.js themes!)
7. Highlight.js : Gruvbox Dark theme (choose from 77 Highlight.js themes!)
8. Cleanly escaped code without syntax highlighting (Plain Flavor)
1. Prismatic General Settings
2. Prismatic Prism.js Settings
3. Prismatic Highlight.js Settings
4. Prismatic Plain Flavor Settings
5. Prism.js : Twilight theme (choose from 7 Prism.js themes!)
6. Highlight.js : Arduino Light theme (choose from 77 Highlight.js themes!)
7. Highlight.js : Gruvbox Dark theme (choose from 77 Highlight.js themes!)
8. Cleanly escaped code without syntax highlighting (Plain Flavor)
9. Gutenberg Prismatic block (under Formatting menu)
10. Prismatic block showing added code and language select
11. Prismatic TinyMCE/Visual button for adding code snippets
12. Prismatic TinyMCE panel showing added code and selected language
== Installation ==
@ -114,7 +123,26 @@ This plugin does not collect or store any user data. It does not set any cookies
__Note:__ Please read the section below on "code escaping" to understand how it works.
_[More info on installing WP plugins](http://codex.wordpress.org/Managing_Plugins#Installing_Plugins)_
_[More info on installing WP plugins](https://codex.wordpress.org/Managing_Plugins#Installing_Plugins)_
**Quick Start Guide**
Here is a quick guide to started with Prismatic:
1. Activate the plugin and visit the Prismatic settings page
2. Choose Prism.js or Highlight.js for syntax highlighting
3. Optionally visit the Prism.js or Highlight.js tab to customize options
You are now ready to go. To add a code snippet to any WP Post or Page:
* If using Gutenberg Block Editor, click on the Prismatic block
* If using Classic Editor, click on the Prismatic TinyMCE button
To get a better idea, view the screenshots on the [Prismatic homepage](https://wordpress.org/plugins/prismatic/).
The Prismatic block or button makes it easy to add your code snippet and choose a language. The plugin automatically will output the correct markup to display your code with syntax highlighting. No code editing required! Note: Advanced usage information provided further down on this page.
@ -138,7 +166,7 @@ To restore default plugin options, either uninstall/reinstall the plugin or visi
**Usage: Syntax Highlighting**
The Prismatic plugin follows the same conventions used by [Prism.js](http://prismjs.com/) and [Highlight.js](https://highlightjs.org/). Here are the basic steps:
The Prismatic plugin follows the same conventions used by [Prism.js](https://prismjs.com/) and [Highlight.js](https://highlightjs.org/). Here are the basic steps:
1. Visit the Prismatic General Settings and choose your library
2. Visit the settings tab for your chosen library
@ -149,6 +177,8 @@ Once the settings are configured, you can enable syntax highlighting for any cod
* Wrap multi-line code with pre &amp; code tags: &lt;pre&gt;&lt;code&gt;...&lt;/code&gt;&lt;/pre&gt;
* Wrap single-line code with code tags: &lt;code&gt;...&lt;/code&gt;
The plugin also provides a Prismatic Gutenberg block and TinyMCE buttons. So you can add code snippets with a few clicks easily.
__Note:__ Prism.js highlights both multi-line and single-line code snippets. Highlight.js only supports multi-line code snippets.
With the proper markup in place, you can indicate a specific language by adding a class of `language-abc` or `lang-abc` to the &lt;code&gt; tag (where "abc" is the language identifier). For example, to indicate PHP as the language for a single-line code snippet:
@ -254,25 +284,35 @@ __Important!__ As explained, enabling code escaping in the Admin Area may result
**Usage: Gutenberg Block Editor
**Usage: Gutenberg Block Editor**
To highlight a code block using Gutenberg:
1. Add code to a code block
2. Open the Advanced menu in the right sidebar
3. Add `language-type` to the "Additional CSS Class" option
1. Select the Prismatic block
2. Select a code language (via sidebar options)
3. Add your code and done.
Save changes and done.
**Usage: Classic TinyMCE Editor**
To highlight code using the TinyMCE/Visual/Rich-Text Editor:
1. Click the Prismatic button (looks like `<>`)
2. Choose a code language
3. Add your code and click "OK" button
There also is a Prismatic Quicktag button ("pre") for those using the Plain-Text editor.
**About Prism.js**
Prism.js version used in Prismatic plugin: __1.16.0__
Prism.js version used in Prismatic plugin: __1.17.1__
__Prism.js resources__
* [Homepage](http://prismjs.com/)
* [Homepage](https://prismjs.com/)
* [GitHub](https://github.com/PrismJS/prism)
* [Changelog](https://github.com/PrismJS/prism/blob/gh-pages/CHANGELOG.md)
@ -280,8 +320,8 @@ __License &amp; Info__
/*
Prism: Lightweight, robust, elegant syntax highlighting
MIT license http://www.opensource.org/licenses/mit-license.php/
@author Lea Verou http://lea.verou.me
MIT license https://www.opensource.org/licenses/mit-license.php/
@author Lea Verou https://lea.verou.me
*/
__Supported Languages__
@ -331,6 +371,7 @@ __Supported Languages__
SCSS = scss
SQL = sql
Swift = swift
TSX = tsx
Twig = twig
TypeScript = typescript
Visual Basic = visual-basic
@ -354,7 +395,7 @@ _I'm glad to add more languages, [make a suggestion](https://perishablepress.com
**About Highlight.js**
Highlight.js version used in Prismatic plugin: __9.15.6__
Highlight.js version used in Prismatic plugin: __9.15.9__
__Highlight.js resources__
@ -410,6 +451,7 @@ __Supported Languages__
SQL = sql
Swift = swift
TypeScript = typescript, ts
YAML = yaml
So for example, to specify a code block as C++, you would write:
@ -425,6 +467,10 @@ To disable Highlight.js syntax highlighting for any code block, add a class of `
<code class="nohighlight">...</code>
Similarly, you can add a class of `plaintext` to make arbitrary text look like code, but without highlighting:
<code class="plaintext">...</code>
_I'm glad to add more languages, [make a suggestion](https://perishablepress.com/contact/)_
@ -446,13 +492,18 @@ Yes, feel free to [suggest a language](https://perishablepress.com/contact/)
**Does this work with Gutenberg Block Editor?**
Yes, it works with both highlight.js and prism.js. Here are the steps:
Yes, the plugin provides a "Prismatic" block that makes it easy to add code snippets that will be highlighted on the front-end. Also provides "add code" buttons for the Classic TinyMCE (Visual/Text) Editor. Add code, choose a language, done!
1. Add your code using a code block
2. In the "Advanced" tab, add the necessary class (e.g., `lang-php`)
3. Save changes and done.
More info [here](https://wordpress.org/support/topic/works-in-gutenberg-for-me/).
**Display syntax-highlighted code inside Block Editor?**
If for some reason you want to view syntax-highlighted code inside of the Block Editor, you can do it with the Classic Block:
1. Select the Classic Block
2. Click on the Prismatic TinyMCE button
3. Enter your code and save changes
The code won't be highlighted initially, but if you refresh the page after making changes, or visit the page again in the future, the code will be displayed with syntax highlighting applied.
**Got a question?**
@ -484,9 +535,25 @@ Links, tweets and likes also appreciated. Thank you! :)
== Changelog ==
If you like Prismatic, please take a moment to [give a 5-star rating](https://wordpress.org/support/plugin/prismatic/reviews/?rate=5#new-post). It helps to keep development and support going strong. Thank you!
Thank you to everyone providing feedback! If you like Prismatic, please take a moment to [give a 5-star rating](https://wordpress.org/support/plugin/prismatic/reviews/?rate=5#new-post). It helps to keep development and support going strong. Thank you!
**2.2 (2019/08/16)**
* Resolves several warnings in PHP 7+
* Adds `prismatic_get_default_options()`
* Adds Quicktag button for plain-text editor
* Adds TinyMCE buttons for Prism.js and Highlight.js
* Adds Blocks for Prism.js, Highlight.js, and Plain Flavor
* Changes priority of content filter in `prismatic_add_filters()`
* Updates Highlight.js core to version 9.15.9
* Adds YAML language for Highlight.js
* Updates Prism.js core to version 1.17.1
* Adds TSX language for Prism.js
* Updates some links to https
* Generates new default translation template
* Tests on WordPress 5.3 (alpha)
**2.1 (2019/04/28)**
* Bumps [minimum PHP version](https://codex.wordpress.org/Template:Server_requirements) to 5.6.20