@videinfra/static-website-builder 1.15.9 → 1.15.10
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
CHANGED
|
@@ -4,6 +4,9 @@ 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
|
+
## [1.15.10] - 2025-09-26
|
|
8
|
+
- Updated "preposition_nbsp" TWIG filter
|
|
9
|
+
|
|
7
10
|
## [1.15.9] - 2025-09-10
|
|
8
11
|
- Added dashes to the "preposition_nbsp" TWIG filter
|
|
9
12
|
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
const prepositions = [
|
|
2
2
|
'about', 'above', 'across', 'after', 'against', 'along', 'amid', 'among', 'around', 'as', 'at', 'before', 'behind', 'below', 'beneath', 'beside', 'besides', 'between', 'beyond', 'by', 'concerning', 'despite', 'down', 'during', 'except', 'for', 'from', 'in', 'inside', 'into', 'like', 'near', 'of', 'off', 'on', 'onto', 'out', 'outside', 'over', 'past', 'regarding', 'round', 'since', 'through', 'throughout', 'to', 'toward', 'towards', 'under', 'underneath', 'until', 'unto', 'up', 'upon', 'with', 'within', 'without', 'a', 'an', 'the',
|
|
3
|
-
'в', 'на', 'по', 'к', 'у', 'от', 'из', 'с', 'над', 'под', 'при', 'без', 'до', 'для', 'за', 'через', 'перед', 'около', 'вокруг', 'о', 'об', 'обо', 'про', 'среди', 'между', 'ради', 'вдоль', 'вне', 'кроме', 'сквозь', 'вследствие', 'благодаря', 'согласно', 'вопреки', 'вроде', 'насчёт', 'касательно', '
|
|
3
|
+
'в', 'на', 'по', 'к', 'у', 'от', 'из', 'с', 'над', 'под', 'при', 'без', 'до', 'для', 'за', 'через', 'перед', 'около', 'вокруг', 'о', 'об', 'обо', 'про', 'среди', 'между', 'ради', 'вдоль', 'вне', 'кроме', 'сквозь', 'вследствие', 'благодаря', 'согласно', 'вопреки', 'вроде', 'насчёт', 'касательно', 'со', 'против', 'во', 'ко', 'ото', 'изо', 'надо', 'подо', 'передо', 'передо', 'из-за', 'чтобы', 'когда', 'его', 'которое', 'как', 'и', 'ей', 'они', 'мы', 'или', 'всё', 'я', 'которое', 'вашей', 'эти', 'что', 'вам', 'не уверены', 'а', 'вы', 'этим', 'вашим', 'все', 'если', 'о которой', 'в этом', 'но', 'которые', 'же', 'ваш', 'этой'
|
|
4
4
|
];
|
|
5
5
|
|
|
6
|
+
|
|
6
7
|
// Word boundary regex
|
|
7
8
|
// (?<= # Lookbehind, but don't consume
|
|
8
9
|
// (^| # Start of string or
|
|
@@ -21,6 +22,7 @@ const regexNdashEntity = /\s+–/uig;
|
|
|
21
22
|
const regexHyphenEntity = /\s+-/uig;
|
|
22
23
|
const regexHyphen2Entity = /\s+‐/uig;
|
|
23
24
|
const regexFigureDashEntity = /\s+‒/uig;
|
|
25
|
+
const regexDashEntity = /\s+‐/uig;
|
|
24
26
|
|
|
25
27
|
let prepositionsRegex = null;
|
|
26
28
|
|
|
@@ -47,6 +49,7 @@ function prepositionNbsp(text) {
|
|
|
47
49
|
text = text.replace(regexHyphenEntity, ' -', text);
|
|
48
50
|
text = text.replace(regexHyphen2Entity, ' ‐', text);
|
|
49
51
|
text = text.replace(regexFigureDashEntity, ' ‒', text);
|
|
52
|
+
text = text.replace(regexDashEntity, ' ‐', text);
|
|
50
53
|
|
|
51
54
|
return text;
|
|
52
55
|
}
|
|
@@ -27,6 +27,7 @@ test('preposition_nbsp hyphens', () => {
|
|
|
27
27
|
expect(preposition_nbsp('hello - world')).toEqual('hello - world');
|
|
28
28
|
expect(preposition_nbsp('hello ‐ world')).toEqual('hello ‐ world');
|
|
29
29
|
expect(preposition_nbsp('hello ‒ world')).toEqual('hello ‒ world');
|
|
30
|
+
expect(preposition_nbsp('hello ‐ world')).toEqual('hello ‐ world');
|
|
30
31
|
|
|
31
32
|
// Don't replace hyphens with entities if not needed
|
|
32
33
|
expect(preposition_nbsp('hello— world')).toEqual('hello— world');
|