Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.2.0 #36

Merged
merged 8 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
Syntax.js

[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Syntax.js%2C%20a%20free%20JavaScript%20syntax%20highlighter&url=https://github.com/williamtroup/Syntax.js&hashtags=javascript,syntax,highlighter)
[![npm](https://img.shields.io/badge/npmjs-v2.1.1-blue)](https://www.npmjs.com/package/jsyntax.js)
[![nuget](https://img.shields.io/badge/nuget-v2.1.1-purple)](https://www.nuget.org/packages/jSyntax.js/)
[![npm](https://img.shields.io/badge/npmjs-v2.2.0-blue)](https://www.npmjs.com/package/jsyntax.js)
[![nuget](https://img.shields.io/badge/nuget-v2.2.0-purple)](https://www.nuget.org/packages/jSyntax.js/)
[![license](https://img.shields.io/badge/license-MIT-green)](https://github.com/williamtroup/Syntax.js/blob/main/LICENSE.txt)
[![discussions Welcome](https://img.shields.io/badge/discussions-Welcome-red)](https://github.com/williamtroup/Syntax.js/discussions)
[![coded by William Troup](https://img.shields.io/badge/coded_by-William_Troup-yellow)](https://github.com/williamtroup)
</h1>

> <p align="center">A lightweight, and easy-to-use, JavaScript library for code syntax highlighting!</p>
> <p align="center">v2.1.1</p>
> <p align="center">v2.2.0</p>
<br />

![Syntax.js](docs/images/main.png)
Expand All @@ -28,7 +28,7 @@ Syntax.js
- Full CSS theme support (using :root variables, with a default dark-mode theme).
- Coping and Printing support is available via action buttons.
- Custom triggers for actions (when elements are rendered, keywords are clicked, etc).
- 26 of the most popular languages built in by default (with public function support to add more).
- 27 of the most popular languages built in by default (with public function support to add more).
- Language aliases.
- Custom action buttons (via a binding attribute), with opening/closing support.
- Unknown language support (renders the display, but does not highlight any syntax).
Expand All @@ -54,6 +54,7 @@ To see a list of all the most recent changes, click [here](docs/CHANGE_LOG.md).
- C++
- C#
- C
- CSS
- Dart
- Delphi
- F#
Expand Down Expand Up @@ -202,4 +203,6 @@ Configuration options allow you to customize how Syntax.js will function. You c
</script>
```

To see a list of all the available configuration options you can use, click [here](docs/CONFIGURATION_OPTIONS.md).
To see a list of all the available configuration options you can use, click [here](docs/configuration/OPTIONS.md).

To see a list of all the available configuration options custom triggers you can use, click [here](docs/configuration/CUSTOM_TRIGGERS.md).
13 changes: 8 additions & 5 deletions README_NUGET.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Syntax.js v2.1.1
# Syntax.js v2.2.0

[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Syntax.js%2C%20a%20free%20JavaScript%20syntax%20highlighter&url=https://github.com/williamtroup/Syntax.js&hashtags=javascript,syntax,highlighter)
[![npm](https://img.shields.io/badge/npmjs-v2.1.1-blue)](https://www.npmjs.com/package/jsyntax.js)
[![nuget](https://img.shields.io/badge/nuget-v2.1.1-purple)](https://www.nuget.org/packages/jSyntax.js/)
[![npm](https://img.shields.io/badge/npmjs-v2.2.0-blue)](https://www.npmjs.com/package/jsyntax.js)
[![nuget](https://img.shields.io/badge/nuget-v2.2.0-purple)](https://www.nuget.org/packages/jSyntax.js/)
[![license](https://img.shields.io/badge/license-MIT-green)](https://github.com/williamtroup/Syntax.js/blob/main/LICENSE.txt)
[![discussions Welcome](https://img.shields.io/badge/discussions-Welcome-red)](https://github.com/williamtroup/Syntax.js/discussions)
[![coded by William Troup](https://img.shields.io/badge/coded_by-William_Troup-yellow)](https://github.com/williamtroup)
Expand All @@ -19,7 +19,7 @@
- Full CSS theme support (using :root variables, with a default dark-mode theme).
- Coping and Printing support is available via action buttons.
- Custom triggers for actions (when elements are rendered, keywords are clicked, etc).
- 26 of the most popular languages built in by default (with public function support to add more).
- 27 of the most popular languages built in by default (with public function support to add more).
- Language aliases.
- Custom action buttons (via a binding attribute), with opening/closing support.
- Unknown language support (renders the display, but does not highlight any syntax).
Expand All @@ -42,6 +42,7 @@ To see a list of all the most recent changes, click [here](https://github.com/wi
- C++
- C#
- C
- CSS
- Dart
- Delphi
- F#
Expand Down Expand Up @@ -180,4 +181,6 @@ Configuration options allow you to customize how Syntax.js will function. You c
</script>
```

To see a list of all the available configuration options you can use, click [here](https://github.com/williamtroup/Syntax.js/blob/main/docs/CONFIGURATION_OPTIONS.md).
To see a list of all the available configuration options you can use, click [here](https://github.com/williamtroup/Syntax.js/blob/main/docs/OPTIONS.md).

To see a list of all the available configuration options custom triggers you can use, click [here](https://github.com/williamtroup/Syntax.js/blob/main/docs/CUSTOM_TRIGGERS.md).
2 changes: 1 addition & 1 deletion dist/languages/syntax.bash.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Syntax.js v2.1.1 | (c) Bunoon | MIT License */
/*! Syntax.js v2.2.0 | (c) Bunoon | MIT License */
$syntax.addLanguage( "bash", {
friendlyName: "Bash",
keywords: [
Expand Down
2 changes: 1 addition & 1 deletion dist/languages/syntax.c-plus-plus.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Syntax.js v2.1.1 | (c) Bunoon | MIT License */
/*! Syntax.js v2.2.0 | (c) Bunoon | MIT License */
$syntax.addLanguage( "c-plus-plus", {
friendlyName: "C++",
keywords: [
Expand Down
2 changes: 1 addition & 1 deletion dist/languages/syntax.c-sharp.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Syntax.js v2.1.1 | (c) Bunoon | MIT License */
/*! Syntax.js v2.2.0 | (c) Bunoon | MIT License */
$syntax.addLanguage( "c-sharp", {
friendlyName: "C#",
keywords: [
Expand Down
2 changes: 1 addition & 1 deletion dist/languages/syntax.c.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Syntax.js v2.1.1 | (c) Bunoon | MIT License */
/*! Syntax.js v2.2.0 | (c) Bunoon | MIT License */
$syntax.addLanguage( "c", {
friendlyName: "C",
keywords: [
Expand Down
210 changes: 210 additions & 0 deletions dist/languages/syntax.css.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
/*! Syntax.js v2.2.0 | (c) Bunoon | MIT License */
$syntax.addLanguage( "css", {
friendlyName: "CSS",
keywords: [
"align-content",
"align-items",
"align-self",
"all",
"animation",
"animation-delay",
"animation-direction",
"animation-duration",
"animation-fill-mode",
"animation-iteration-count",
"animation-name",
"animation-play-state",
"animation-timing-function",
"backface-visibility",
"background",
"background-attachment",
"background-blend-mode",
"background-clip",
"background-color",
"background-image",
"background-origin",
"background-position",
"background-repeat",
"background-size",
"border",
"border-bottom",
"border-bottom-color",
"border-bottom-left-radius",
"border-bottom-right-radius",
"border-bottom-style",
"border-bottom-width",
"border-collapse",
"border-color",
"border-image",
"border-image-outset",
"border-image-repeat",
"border-image-slice",
"border-image-source",
"border-image-width",
"border-left",
"border-left-color",
"border-left-style",
"border-left-width",
"border-radius",
"border-right",
"border-right-color",
"border-right-style",
"border-right-width",
"border-spacing",
"border-style",
"border-top",
"border-top-color",
"border-top-left-radius",
"border-top-right-radius",
"border-top-style",
"border-top-width",
"border-width",
"bottom",
"box-shadow",
"box-sizing",
"caption-side",
"caret-color",
"@charset",
"clear",
"clip",
"clip-path",
"color",
"column-count",
"column-fill",
"column-gap",
"column-rule",
"column-rule-color",
"column-rule-style",
"column-rule-width",
"column-span",
"column-width",
"columns",
"content",
"counter-increment",
"counter-reset",
"cursor",
"direction",
"display",
"empty-cells",
"filter",
"flex",
"flex-basis",
"flex-direction",
"flex-flow",
"flex-grow",
"flex-shrink",
"flex-wrap",
"float",
"font",
"@font-face",
"font-family",
"font-kerning",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"grid",
"grid-area",
"grid-auto-columns",
"grid-auto-flow",
"grid-auto-rows",
"grid-column",
"grid-column-end",
"grid-column-gap",
"grid-column-start",
"grid-gap",
"grid-row",
"grid-row-end",
"grid-row-gap",
"grid-row-start",
"grid-template",
"grid-template-areas",
"grid-template-columns",
"grid-template-rows",
"height",
"hyphens",
"@import",
"justify-content",
"@keyframes",
"left",
"letter-spacing",
"line-height",
"list-style",
"list-style-image",
"list-style-position",
"list-style-type",
"margin",
"margin-bottom",
"margin-left",
"margin-right",
"margin-top",
"max-height",
"max-width",
"@media",
"min-height",
"min-width",
"object-fit",
"object-position",
"opacity",
"order",
"outline",
"outline-color",
"outline-offset",
"outline-style",
"outline-width",
"overflow",
"overflow-x",
"overflow-y",
"padding",
"padding-bottom",
"padding-left",
"padding-right",
"padding-top",
"page-break-after",
"page-break-before",
"page-break-inside",
"perspective",
"perspective-origin",
"pointer-events",
"position",
"quotes",
"right",
"scroll-behavior",
"table-layout",
"text-align",
"text-align-last",
"text-decoration",
"text-decoration-color",
"text-decoration-line",
"text-decoration-style",
"text-indent",
"text-justify",
"text-overflow",
"text-shadow",
"text-transform",
"top",
"transform",
"transform-origin",
"transform-style",
"transition",
"transition-delay",
"transition-duration",
"transition-property",
"transition-timing-function",
"user-select",
"vertical-align",
"visibility",
"white-space",
"width",
"word-break",
"word-spacing",
"word-wrap",
"writing-mode",
"z-index"
],
multiLineComment: [ "/*", "*/" ],
caseSensitive: true,
keywordsCasing: "initial"
}, false );
2 changes: 1 addition & 1 deletion dist/languages/syntax.dart.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Syntax.js v2.1.1 | (c) Bunoon | MIT License */
/*! Syntax.js v2.2.0 | (c) Bunoon | MIT License */
$syntax.addLanguage( "dart", {
friendlyName: "Dart",
keywords: [
Expand Down
2 changes: 1 addition & 1 deletion dist/languages/syntax.delphi.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Syntax.js v2.1.1 | (c) Bunoon | MIT License */
/*! Syntax.js v2.2.0 | (c) Bunoon | MIT License */
$syntax.addLanguage( "delphi", {
friendlyName: "Delphi",
keywords: [
Expand Down
2 changes: 1 addition & 1 deletion dist/languages/syntax.f-sharp.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Syntax.js v2.1.1 | (c) Bunoon | MIT License */
/*! Syntax.js v2.2.0 | (c) Bunoon | MIT License */
$syntax.addLanguage( "f-sharp", {
friendlyName: "F#",
keywords: [
Expand Down
2 changes: 1 addition & 1 deletion dist/languages/syntax.go.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Syntax.js v2.1.1 | (c) Bunoon | MIT License */
/*! Syntax.js v2.2.0 | (c) Bunoon | MIT License */
$syntax.addLanguage( "go", {
friendlyName: "Go",
keywords: [
Expand Down
2 changes: 1 addition & 1 deletion dist/languages/syntax.html.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Syntax.js v2.1.1 | (c) Bunoon | MIT License */
/*! Syntax.js v2.2.0 | (c) Bunoon | MIT License */
$syntax.addLanguage( "html", {
friendlyName: "HTML",
keywords: [
Expand Down
2 changes: 1 addition & 1 deletion dist/languages/syntax.java.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Syntax.js v2.1.1 | (c) Bunoon | MIT License */
/*! Syntax.js v2.2.0 | (c) Bunoon | MIT License */
$syntax.addLanguage( "java", {
friendlyName: "Java",
keywords: [
Expand Down
2 changes: 1 addition & 1 deletion dist/languages/syntax.javascript.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Syntax.js v2.1.1 | (c) Bunoon | MIT License */
/*! Syntax.js v2.2.0 | (c) Bunoon | MIT License */
$syntax.addLanguage( "javascript", {
friendlyName: "JavaScript",
keywords: [
Expand Down
2 changes: 1 addition & 1 deletion dist/languages/syntax.kotlin.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Syntax.js v2.1.1 | (c) Bunoon | MIT License */
/*! Syntax.js v2.2.0 | (c) Bunoon | MIT License */
$syntax.addLanguage( "kotlin", {
friendlyName: "Kotlin",
keywords: [
Expand Down
2 changes: 1 addition & 1 deletion dist/languages/syntax.lua.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Syntax.js v2.1.1 | (c) Bunoon | MIT License */
/*! Syntax.js v2.2.0 | (c) Bunoon | MIT License */
$syntax.addLanguage( "lua", {
friendlyName: "Lua",
keywords: [
Expand Down
2 changes: 1 addition & 1 deletion dist/languages/syntax.matlab.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Syntax.js v2.1.1 | (c) Bunoon | MIT License */
/*! Syntax.js v2.2.0 | (c) Bunoon | MIT License */
$syntax.addLanguage( "matlab", {
friendlyName: "Matlab",
keywords: [
Expand Down
2 changes: 1 addition & 1 deletion dist/languages/syntax.ms-sql.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Syntax.js v2.1.1 | (c) Bunoon | MIT License */
/*! Syntax.js v2.2.0 | (c) Bunoon | MIT License */
$syntax.addLanguage( "ms-sql", {
friendlyName: "MS SQL",
keywords: [
Expand Down
2 changes: 1 addition & 1 deletion dist/languages/syntax.perl.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Syntax.js v2.1.1 | (c) Bunoon | MIT License */
/*! Syntax.js v2.2.0 | (c) Bunoon | MIT License */
$syntax.addLanguage( "perl", {
friendlyName: "Perl",
keywords: [
Expand Down
2 changes: 1 addition & 1 deletion dist/languages/syntax.php.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Syntax.js v2.1.1 | (c) Bunoon | MIT License */
/*! Syntax.js v2.2.0 | (c) Bunoon | MIT License */
$syntax.addLanguage( "php", {
friendlyName: "PHP",
keywords: [
Expand Down
Loading
Loading