Skip to content

Commit

Permalink
Merge branch 'main' into perl-class
Browse files Browse the repository at this point in the history
  • Loading branch information
bmeneg authored Oct 26, 2023
2 parents 80adcc4 + 1adee3a commit 9fda4c3
Show file tree
Hide file tree
Showing 10 changed files with 221 additions and 34 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
- name: Publish highlight.js to NPM
id: publish
uses: JS-DevTools/npm-publish@v2
uses: JS-DevTools/npm-publish@v3
with:
check-version: true
token: ${{ secrets.NPM_TOKEN }}
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
- name: Publish cdn-assets to NPM
id: publish_cdn
uses: JS-DevTools/npm-publish@v2
uses: JS-DevTools/npm-publish@v3
with:
check-version: true
token: ${{ secrets.NPM_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ jobs:
- if: contains(matrix.build-how, 'node')
name: Test Node.js build is "use strict" safe
run: |
./node_modules/.bin/rollup -c test/builds/rollup_import_via_commonjs.js
./node_modules/.bin/rollup -c test/builds/rollup_import_via_commonjs.mjs
node build/bundle.js
6 changes: 4 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@
Core Grammars:

- fix(css) fix overly greedy pseudo class matching [Bradley Mackey][]
- enh(arcade) updated to ArcGIS Arcade version 1.24 [Kristian Ekenes][]

[Bradley Mackey]: https://github.com/bradleymackey
[Kristian Ekenes]: https://github.com/ekenes


## Version 11.9.0

CAVEATS / POTENTIALLY BREAKING CHANGES

- Drops support for Node 14.x, which is no longer supported by Node.js.
- In the `node` build `styles/*.css` files now ship un-minified
- In the `node` build `styles/*.css` files now ship un-minified
with minified counterparts as: `styles/*.min.css` [mvorisek][]
(this makes things consistent with our `cdn` builds)
(this makes things consistent with our `cdn` builds)

Parser:

Expand Down
5 changes: 3 additions & 2 deletions SUPPORTED_LANGUAGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ The table below shows the full list of languages (and corresponding classes/alia
| Erlang | erlang, erl | |
| Excel | excel, xls, xlsx | |
| Extempore | extempore, xtlang, xtm | [highlightjs-xtlang](https://github.com/highlightjs/highlightjs-xtlang) |
| F# | fsharp, fs | |
| F# | fsharp, fs, fsx, fsi, fsscript | |
| FIX | fix | |
| Flix | flix | [highlightjs-flix](https://github.com/flix/highlightjs-flix) |
| Fortran | fortran, f90, f95 | |
Expand Down Expand Up @@ -114,7 +114,8 @@ The table below shows the full list of languages (and corresponding classes/alia
| Java | java, jsp | |
| JavaScript | javascript, js, jsx | |
| Jolie | jolie, iol, ol | [highlightjs-jolie](https://github.com/xiroV/highlightjs-jolie) |
| Julia | julia, julia-repl | |
| Julia | julia, jl | |
| Julia REPL | julia-repl | |
| Kotlin | kotlin, kt | |
| Lang | | [highlightjs-lang](https://github.com/highlightjs/highlightjs-lang)
| LaTeX | tex | |
Expand Down
8 changes: 4 additions & 4 deletions docs/language-requests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ time to time in the Highlight.js issue tracker and discussion group.
Highlight.js does not have a fundamental plan for implementing new languages
- i.e., the core team doesn't usually develop new languages. The core team
instead focuses on parser development, bugs, and supporting the existing
languages. They also currently does not have time to review, merge and
maintain any additional languages (fixing bugs, dealing with issues, etc).
languages. They also do not have time to review, merge, and maintain
additional languages (fixing bugs, dealing with issues, etc).

Instead, the project works by encouraging 3rd party language grammars from
contributors willing to help develop and maintain them. We're also happy to
Expand All @@ -19,8 +19,8 @@ time to time in the Highlight.js issue tracker and discussion group.
This means that *there's no point in requesting a new language without also
providing a 3rd party implementation* (we'll simply close "Please support
language Xyz" issues with a link to this explanation). If you'd like to see
a particular language available but cannot implement it, the best way to
make it happen is to find another developer interested in doing so.
a particular language supported, the best way forward is to build the grammar
yourself, or find a developer interested in doing so.

For more info on actually developing a language see our :doc:`language-guide`,
and for information on how to properly package your 3rd party language module
Expand Down
100 changes: 78 additions & 22 deletions src/languages/arcade.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,44 @@

/** @type LanguageFn */
export default function(hljs) {
const regex = hljs.regex;
const IDENT_RE = '[A-Za-z_][0-9A-Za-z_]*';
const KEYWORDS = {
keyword: [
"if",
"break",
"case",
"catch",
"continue",
"debugger",
"do",
"else",
"export",
"for",
"while",
"var",
"new",
"function",
"do",
"if",
"import",
"in",
"new",
"return",
"switch",
"try",
"var",
"void",
"else",
"break"
"while"
],
literal: [
"BackSlash",
"DoubleQuote",
"false",
"ForwardSlash",
"Infinity",
"NaN",
"NewLine",
"null",
"PI",
"SingleQuote",
"Tab",
"TextFormatting",
"false",
"null",
"true",
"undefined"
],
Expand All @@ -60,19 +70,22 @@ export default function(hljs) {
"BufferGeodetic",
"Ceil",
"Centroid",
"ChangeTimeZone",
"Clip",
"Concatenate",
"Console",
"Constrain",
"Contains",
"ConvertDirection",
"ConvexHull",
"Cos",
"Count",
"Crosses",
"Cut",
"Date",
"Date|0",
"DateAdd",
"DateDiff",
"DateOnly",
"Day",
"Decode",
"DefaultValue",
Expand All @@ -99,36 +112,41 @@ export default function(hljs) {
"FeatureSetById",
"FeatureSetByName",
"FeatureSetByPortalItem",
"FeatureSetByRelationshipClass",
"FeatureSetByRelationshipName",
"Filter",
"Find",
"First",
"First|0",
"Floor",
"FromCharCode",
"FromCodePoint",
"FromJSON",
"Front",
"GdbVersion",
"Generalize",
"Geometry",
"GetEnvironment",
"GetFeatureSet",
"GetFeatureSetInfo",
"GetUser",
"GroupBy",
"Guid",
"Hash",
"HasKey",
"HasValue",
"Hash",
"Hour",
"IIf",
"ISOMonth",
"ISOWeek",
"ISOWeekday",
"ISOYear",
"Includes",
"IndexOf",
"Insert",
"Intersection",
"Intersects",
"IsEmpty",
"IsNan",
"ISOMonth",
"ISOWeek",
"ISOWeekday",
"ISOYear",
"IsSelfIntersecting",
"IsSimple",
"Left|0",
Expand All @@ -147,11 +165,13 @@ export default function(hljs) {
"Month",
"MultiPartToSinglePart",
"Multipoint",
"NearestCoordinate",
"NearestVertex",
"NextSequenceValue",
"None",
"Now",
"Number",
"Offset|0",
"Offset",
"OrderBy",
"Overlaps",
"Point",
Expand Down Expand Up @@ -182,6 +202,7 @@ export default function(hljs) {
"Splice",
"Split",
"Sqrt",
"StandardizeGuid",
"Stdev",
"SubtypeCode",
"SubtypeName",
Expand All @@ -190,15 +211,18 @@ export default function(hljs) {
"SymmetricDifference",
"Tan",
"Text",
"Time",
"TimeZone",
"TimeZoneOffset",
"Timestamp",
"ToCharCode",
"ToCodePoint",
"Today",
"ToHex",
"ToLocal",
"ToUTC",
"Today",
"Top|0",
"Touches",
"ToUTC",
"TrackAccelerationAt",
"TrackAccelerationWindow",
"TrackCurrentAcceleration",
Expand All @@ -223,14 +247,46 @@ export default function(hljs) {
"Variance",
"Week",
"Weekday",
"When",
"When|0",
"Within",
"Year"
"Year|0",
]
};
const PROFILE_VARS = [
"aggregatedFeatures",
"analytic",
"config",
"datapoint",
"datastore",
"editcontext",
"feature",
"featureSet",
"feedfeature",
"fencefeature",
"fencenotificationtype",
"join",
"layer",
"locationupdate",
"map",
"measure",
"measure",
"originalFeature",
"record",
"reference",
"rowindex",
"sourcedatastore",
"sourcefeature",
"sourcelayer",
"target",
"targetdatastore",
"targetfeature",
"targetlayer",
"value",
"view"
];
const SYMBOL = {
className: 'symbol',
begin: '\\$[datastore|feature|layer|map|measure|sourcefeature|sourcelayer|targetfeature|targetlayer|value|view]+'
begin: '\\$' + regex.either(...PROFILE_VARS)
};
const NUMBER = {
className: 'number',
Expand Down
Loading

0 comments on commit 9fda4c3

Please sign in to comment.