ventojs 2.0.0-canary.3 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -1
- package/core/js.js +1 -1
- package/highlightjs-vento.js +1 -1
- package/package.json +1 -1
- package/prism-vento.js +3 -3
package/CHANGELOG.md
CHANGED
@@ -4,7 +4,11 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
6
6
|
|
7
|
-
## 2.0.
|
7
|
+
## [2.0.1] - 2025-09-05
|
8
|
+
### Fixed
|
9
|
+
- One-letter variable names are not captured.
|
10
|
+
|
11
|
+
## [2.0.0] - 2025-09-01
|
8
12
|
Vento 2.0 is now dependency-free and compatible with browsers without a build step.
|
9
13
|
|
10
14
|
### Added
|
@@ -33,6 +37,7 @@ Vento 2.0 is now dependency-free and compatible with browsers without a build st
|
|
33
37
|
-- }
|
34
38
|
++ env.compileTokens(tokens, tmpOutput, "/code");
|
35
39
|
```
|
40
|
+
- Prism and Highlight.js adapters: Rename language name to `vto` (from `vento`).
|
36
41
|
|
37
42
|
### Removed
|
38
43
|
- `runStringSync` function.
|
@@ -50,3 +55,6 @@ Vento 2.0 is now dependency-free and compatible with browsers without a build st
|
|
50
55
|
[#134]: https://github.com/ventojs/vento/issues/134
|
51
56
|
[#137]: https://github.com/ventojs/vento/issues/137
|
52
57
|
[#140]: https://github.com/ventojs/vento/issues/140
|
58
|
+
|
59
|
+
[2.0.1]: https://github.com/ventojs/vento/compare/v2.0.0...v2.0.1
|
60
|
+
[2.0.0]: https://github.com/ventojs/vento/releases/tag/v2.0.0
|
package/core/js.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import reserved from "./reserved.js";
|
2
2
|
const TEMPLATE_PART = /[`}](?:\\?[^])*?(?:`|\${)/y;
|
3
3
|
const REGEX_LITERAL_START = /(?<=[(=:,?&!]\s*)\//y;
|
4
|
-
const STOPPING_POINT = /['"`{}[\]/|]|((?<!\.\??)\b[a-zA-Z_]\w
|
4
|
+
const STOPPING_POINT = /['"`{}[\]/|]|((?<!\.\??)\b[a-zA-Z_]\w*)/g;
|
5
5
|
/**
|
6
6
|
* This function iterates over the top-level scope of a JavaScript source code
|
7
7
|
* string. It yields pairs of the index and the type of each top-level element
|
package/highlightjs-vento.js
CHANGED
package/package.json
CHANGED
package/prism-vento.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Prism.languages.
|
1
|
+
Prism.languages.vto = {
|
2
2
|
"delimiter": {
|
3
3
|
pattern: /\{{2}[->]?|-?\}{2}/,
|
4
4
|
alias: "punctuation",
|
@@ -16,11 +16,11 @@ Prism.hooks.add("before-tokenize", function (env) {
|
|
16
16
|
const ventoPattern = /\{{2}[\s\S]+\}{2}/g;
|
17
17
|
Prism.languages["markup-templating"].buildPlaceholders(
|
18
18
|
env,
|
19
|
-
"
|
19
|
+
"vto",
|
20
20
|
ventoPattern,
|
21
21
|
);
|
22
22
|
});
|
23
23
|
|
24
24
|
Prism.hooks.add("after-tokenize", function (env) {
|
25
|
-
Prism.languages["markup-templating"].tokenizePlaceholders(env, "
|
25
|
+
Prism.languages["markup-templating"].tokenizePlaceholders(env, "vto");
|
26
26
|
});
|