@vituum/vite-plugin-latte 1.2.1 → 1.4.0
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/index.js +5 -3
- package/index.php +2 -0
- package/package.json +6 -6
- package/vendor/autoload.php +1 -1
- package/vendor/composer/InstalledVersions.php +7 -4
- package/vendor/composer/autoload_classmap.php +1 -0
- package/vendor/composer/autoload_real.php +4 -4
- package/vendor/composer/autoload_static.php +3 -2
- package/vendor/composer/installed.json +21 -20
- package/vendor/composer/installed.php +8 -8
- package/vendor/latte/latte/composer.json +6 -5
- package/vendor/latte/latte/readme.md +27 -9
- package/vendor/latte/latte/src/Bridges/Tracy/templates/LattePanel.panel.phtml +4 -1
- package/vendor/latte/latte/src/Latte/Compiler/TagLexer.php +1 -1
- package/vendor/latte/latte/src/Latte/Compiler/TagParserData.php +129 -129
- package/vendor/latte/latte/src/Latte/Compiler/TemplateGenerator.php +1 -1
- package/vendor/latte/latte/src/Latte/Compiler/TemplateParser.php +1 -1
- package/vendor/latte/latte/src/Latte/Engine.php +22 -2
- package/vendor/latte/latte/src/Latte/Essential/CachingIterator.php +2 -3
- package/vendor/latte/latte/src/Latte/Essential/CoreExtension.php +9 -1
- package/vendor/latte/latte/src/Latte/Essential/Filters.php +110 -10
- package/vendor/latte/latte/src/Latte/Essential/Nodes/ImportNode.php +8 -2
- package/vendor/latte/latte/src/Latte/Essential/Nodes/VarNode.php +14 -18
- package/vendor/latte/latte/src/Latte/Essential/TranslatorExtension.php +1 -1
- package/vendor/latte/latte/src/Latte/Loaders/FileLoader.php +5 -4
- package/vendor/latte/latte/src/Latte/Runtime/Template.php +1 -1
- package/vendor/latte/latte/src/Latte/Sandbox/Nodes/FunctionCallNode.php +0 -1
- package/vendor/nette/utils/composer.json +1 -1
- package/vendor/nette/utils/readme.md +25 -26
- package/vendor/nette/utils/src/Iterators/CachingIterator.php +5 -19
- package/vendor/nette/utils/src/Iterators/Mapper.php +1 -2
- package/vendor/nette/utils/src/Utils/Arrays.php +61 -29
- package/vendor/nette/utils/src/Utils/Callback.php +1 -1
- package/vendor/nette/utils/src/Utils/FileSystem.php +15 -2
- package/vendor/nette/utils/src/Utils/Finder.php +1 -1
- package/vendor/nette/utils/src/Utils/Helpers.php +3 -0
- package/vendor/nette/utils/src/Utils/Image.php +33 -46
- package/vendor/nette/utils/src/Utils/Iterables.php +100 -20
- package/vendor/nette/utils/src/Utils/Reflection.php +7 -5
- package/vendor/nette/utils/src/Utils/Strings.php +27 -8
- package/vendor/nette/utils/src/Utils/Type.php +2 -2
- package/vendor/nette/utils/src/Utils/exceptions.php +5 -5
- package/vendor/nette/utils/src/exceptions.php +20 -15
package/index.js
CHANGED
|
@@ -50,7 +50,7 @@ const execSync = (cmd) => {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
const renderTemplate = ({ server, path, filename, cwd, packageRoot }, options, content) => {
|
|
53
|
+
const renderTemplate = ({ server, path, filename, cwd, packageRoot, viteServer }, options, content) => {
|
|
54
54
|
const renderTransformedHtml = options.renderTransformedHtml(server ? filename.replace('.html', '') : filename)
|
|
55
55
|
|
|
56
56
|
if (options.data) {
|
|
@@ -83,7 +83,7 @@ const renderTemplate = ({ server, path, filename, cwd, packageRoot }, options, c
|
|
|
83
83
|
fs.writeFileSync(resolve(packageRoot, `temp/${timestamp}.html`), content)
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
const data = Object.assign({ packageRoot, cwd, isRenderTransformedHtml: renderTransformedHtml }, options)
|
|
86
|
+
const data = Object.assign({ packageRoot, cwd, isRenderTransformedHtml: renderTransformedHtml, viteServer }, options)
|
|
87
87
|
|
|
88
88
|
return execSync(`${options.bin} ${packageRoot}/index.php ${join(options.root, server ? path.replace('.html', '') : path)} ${JSON.stringify(JSON.stringify(data))}`)
|
|
89
89
|
}
|
|
@@ -159,7 +159,9 @@ const plugin = (options = {}) => {
|
|
|
159
159
|
return content
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
const
|
|
162
|
+
const viteServer = !!server
|
|
163
|
+
|
|
164
|
+
const render = renderTemplate({ server, path, filename, cwd, packageRoot, viteServer }, options, content)
|
|
163
165
|
const warningLog = render.output.includes('Warning: Undefined')
|
|
164
166
|
|
|
165
167
|
if (render.error || warningLog) {
|
package/index.php
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vituum/vite-plugin-latte",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
"vituum": "^1.1",
|
|
16
16
|
"fast-glob": "^3.3",
|
|
17
17
|
"lodash": "^4.17",
|
|
18
|
-
"minimatch": "^
|
|
18
|
+
"minimatch": "^10.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@types/node": "^
|
|
22
|
-
"vite": "^5.
|
|
23
|
-
"eslint": "^8.
|
|
21
|
+
"@types/node": "^22.9.3",
|
|
22
|
+
"vite": "^5.4.11",
|
|
23
|
+
"eslint": "^8.57.1",
|
|
24
24
|
"eslint-config-standard": "^17.1.0",
|
|
25
|
-
"typescript": "^5.
|
|
25
|
+
"typescript": "^5.7.2"
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
|
28
28
|
"index.js",
|
package/vendor/autoload.php
CHANGED
|
@@ -322,6 +322,7 @@ class InstalledVersions
|
|
|
322
322
|
}
|
|
323
323
|
|
|
324
324
|
$installed = array();
|
|
325
|
+
$copiedLocalDir = false;
|
|
325
326
|
|
|
326
327
|
if (self::$canGetVendors) {
|
|
327
328
|
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
|
|
@@ -330,9 +331,11 @@ class InstalledVersions
|
|
|
330
331
|
} elseif (is_file($vendorDir.'/composer/installed.php')) {
|
|
331
332
|
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
|
|
332
333
|
$required = require $vendorDir.'/composer/installed.php';
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
334
|
+
self::$installedByVendor[$vendorDir] = $required;
|
|
335
|
+
$installed[] = $required;
|
|
336
|
+
if (strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
|
|
337
|
+
self::$installed = $required;
|
|
338
|
+
$copiedLocalDir = true;
|
|
336
339
|
}
|
|
337
340
|
}
|
|
338
341
|
}
|
|
@@ -350,7 +353,7 @@ class InstalledVersions
|
|
|
350
353
|
}
|
|
351
354
|
}
|
|
352
355
|
|
|
353
|
-
if (self::$installed !== array()) {
|
|
356
|
+
if (self::$installed !== array() && !$copiedLocalDir) {
|
|
354
357
|
$installed[] = self::$installed;
|
|
355
358
|
}
|
|
356
359
|
|
|
@@ -204,6 +204,7 @@ return array(
|
|
|
204
204
|
'Nette\\NotImplementedException' => $vendorDir . '/nette/utils/src/exceptions.php',
|
|
205
205
|
'Nette\\NotSupportedException' => $vendorDir . '/nette/utils/src/exceptions.php',
|
|
206
206
|
'Nette\\OutOfRangeException' => $vendorDir . '/nette/utils/src/exceptions.php',
|
|
207
|
+
'Nette\\ShouldNotHappenException' => $vendorDir . '/nette/utils/src/exceptions.php',
|
|
207
208
|
'Nette\\SmartObject' => $vendorDir . '/nette/utils/src/SmartObject.php',
|
|
208
209
|
'Nette\\StaticClass' => $vendorDir . '/nette/utils/src/StaticClass.php',
|
|
209
210
|
'Nette\\UnexpectedValueException' => $vendorDir . '/nette/utils/src/exceptions.php',
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// autoload_real.php @generated by Composer
|
|
4
4
|
|
|
5
|
-
class
|
|
5
|
+
class ComposerAutoloaderInit8535741375194e2773348db6a0091487
|
|
6
6
|
{
|
|
7
7
|
private static $loader;
|
|
8
8
|
|
|
@@ -24,12 +24,12 @@ class ComposerAutoloaderInit19cfb30b66a778b432af39bbd1e78bca
|
|
|
24
24
|
|
|
25
25
|
require __DIR__ . '/platform_check.php';
|
|
26
26
|
|
|
27
|
-
spl_autoload_register(array('
|
|
27
|
+
spl_autoload_register(array('ComposerAutoloaderInit8535741375194e2773348db6a0091487', 'loadClassLoader'), true, true);
|
|
28
28
|
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
|
29
|
-
spl_autoload_unregister(array('
|
|
29
|
+
spl_autoload_unregister(array('ComposerAutoloaderInit8535741375194e2773348db6a0091487', 'loadClassLoader'));
|
|
30
30
|
|
|
31
31
|
require __DIR__ . '/autoload_static.php';
|
|
32
|
-
call_user_func(\Composer\Autoload\
|
|
32
|
+
call_user_func(\Composer\Autoload\ComposerStaticInit8535741375194e2773348db6a0091487::getInitializer($loader));
|
|
33
33
|
|
|
34
34
|
$loader->register(true);
|
|
35
35
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
namespace Composer\Autoload;
|
|
6
6
|
|
|
7
|
-
class
|
|
7
|
+
class ComposerStaticInit8535741375194e2773348db6a0091487
|
|
8
8
|
{
|
|
9
9
|
public static $classMap = array (
|
|
10
10
|
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
|
@@ -205,6 +205,7 @@ class ComposerStaticInit19cfb30b66a778b432af39bbd1e78bca
|
|
|
205
205
|
'Nette\\NotImplementedException' => __DIR__ . '/..' . '/nette/utils/src/exceptions.php',
|
|
206
206
|
'Nette\\NotSupportedException' => __DIR__ . '/..' . '/nette/utils/src/exceptions.php',
|
|
207
207
|
'Nette\\OutOfRangeException' => __DIR__ . '/..' . '/nette/utils/src/exceptions.php',
|
|
208
|
+
'Nette\\ShouldNotHappenException' => __DIR__ . '/..' . '/nette/utils/src/exceptions.php',
|
|
208
209
|
'Nette\\SmartObject' => __DIR__ . '/..' . '/nette/utils/src/SmartObject.php',
|
|
209
210
|
'Nette\\StaticClass' => __DIR__ . '/..' . '/nette/utils/src/StaticClass.php',
|
|
210
211
|
'Nette\\UnexpectedValueException' => __DIR__ . '/..' . '/nette/utils/src/exceptions.php',
|
|
@@ -243,7 +244,7 @@ class ComposerStaticInit19cfb30b66a778b432af39bbd1e78bca
|
|
|
243
244
|
public static function getInitializer(ClassLoader $loader)
|
|
244
245
|
{
|
|
245
246
|
return \Closure::bind(function () use ($loader) {
|
|
246
|
-
$loader->classMap =
|
|
247
|
+
$loader->classMap = ComposerStaticInit8535741375194e2773348db6a0091487::$classMap;
|
|
247
248
|
|
|
248
249
|
}, null, ClassLoader::class);
|
|
249
250
|
}
|
|
@@ -2,43 +2,44 @@
|
|
|
2
2
|
"packages": [
|
|
3
3
|
{
|
|
4
4
|
"name": "latte/latte",
|
|
5
|
-
"version": "v3.0.
|
|
6
|
-
"version_normalized": "3.0.
|
|
5
|
+
"version": "v3.0.20",
|
|
6
|
+
"version_normalized": "3.0.20.0",
|
|
7
7
|
"source": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/nette/latte.git",
|
|
10
|
-
"reference": "
|
|
10
|
+
"reference": "4db7a5502f8cef02fffa84fc9c34a635d9c79d4d"
|
|
11
11
|
},
|
|
12
12
|
"dist": {
|
|
13
13
|
"type": "zip",
|
|
14
|
-
"url": "https://api.github.com/repos/nette/latte/zipball/
|
|
15
|
-
"reference": "
|
|
14
|
+
"url": "https://api.github.com/repos/nette/latte/zipball/4db7a5502f8cef02fffa84fc9c34a635d9c79d4d",
|
|
15
|
+
"reference": "4db7a5502f8cef02fffa84fc9c34a635d9c79d4d",
|
|
16
16
|
"shasum": ""
|
|
17
17
|
},
|
|
18
18
|
"require": {
|
|
19
19
|
"ext-json": "*",
|
|
20
20
|
"ext-tokenizer": "*",
|
|
21
|
-
"php": "8.0 - 8.
|
|
21
|
+
"php": "8.0 - 8.4"
|
|
22
22
|
},
|
|
23
23
|
"conflict": {
|
|
24
24
|
"nette/application": "<3.1.7",
|
|
25
25
|
"nette/caching": "<3.1.4"
|
|
26
26
|
},
|
|
27
27
|
"require-dev": {
|
|
28
|
-
"nette/php-generator": "^
|
|
29
|
-
"nette/tester": "^2.
|
|
30
|
-
"nette/utils": "^
|
|
28
|
+
"nette/php-generator": "^4.0",
|
|
29
|
+
"nette/tester": "^2.5",
|
|
30
|
+
"nette/utils": "^4.0",
|
|
31
31
|
"phpstan/phpstan": "^1",
|
|
32
|
-
"tracy/tracy": "^2.
|
|
32
|
+
"tracy/tracy": "^2.10"
|
|
33
33
|
},
|
|
34
34
|
"suggest": {
|
|
35
35
|
"ext-fileinfo": "to use filter |datastream",
|
|
36
36
|
"ext-iconv": "to use filters |reverse, |substring",
|
|
37
|
+
"ext-intl": "to use Latte\\Engine::setLocale()",
|
|
37
38
|
"ext-mbstring": "to use filters like lower, upper, capitalize, ...",
|
|
38
39
|
"nette/php-generator": "to use tag {templatePrint}",
|
|
39
40
|
"nette/utils": "to use filter |webalize"
|
|
40
41
|
},
|
|
41
|
-
"time": "2024-
|
|
42
|
+
"time": "2024-10-08T00:58:27+00:00",
|
|
42
43
|
"bin": [
|
|
43
44
|
"bin/latte-lint"
|
|
44
45
|
],
|
|
@@ -84,27 +85,27 @@
|
|
|
84
85
|
],
|
|
85
86
|
"support": {
|
|
86
87
|
"issues": "https://github.com/nette/latte/issues",
|
|
87
|
-
"source": "https://github.com/nette/latte/tree/v3.0.
|
|
88
|
+
"source": "https://github.com/nette/latte/tree/v3.0.20"
|
|
88
89
|
},
|
|
89
90
|
"install-path": "../latte/latte"
|
|
90
91
|
},
|
|
91
92
|
{
|
|
92
93
|
"name": "nette/utils",
|
|
93
|
-
"version": "v4.0.
|
|
94
|
-
"version_normalized": "4.0.
|
|
94
|
+
"version": "v4.0.6",
|
|
95
|
+
"version_normalized": "4.0.6.0",
|
|
95
96
|
"source": {
|
|
96
97
|
"type": "git",
|
|
97
98
|
"url": "https://github.com/nette/utils.git",
|
|
98
|
-
"reference": "
|
|
99
|
+
"reference": "ce708655043c7050eb050df361c5e313cf708309"
|
|
99
100
|
},
|
|
100
101
|
"dist": {
|
|
101
102
|
"type": "zip",
|
|
102
|
-
"url": "https://api.github.com/repos/nette/utils/zipball/
|
|
103
|
-
"reference": "
|
|
103
|
+
"url": "https://api.github.com/repos/nette/utils/zipball/ce708655043c7050eb050df361c5e313cf708309",
|
|
104
|
+
"reference": "ce708655043c7050eb050df361c5e313cf708309",
|
|
104
105
|
"shasum": ""
|
|
105
106
|
},
|
|
106
107
|
"require": {
|
|
107
|
-
"php": "
|
|
108
|
+
"php": "8.0 - 8.4"
|
|
108
109
|
},
|
|
109
110
|
"conflict": {
|
|
110
111
|
"nette/finder": "<3",
|
|
@@ -124,7 +125,7 @@
|
|
|
124
125
|
"ext-mbstring": "to use Strings::lower() etc...",
|
|
125
126
|
"ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()"
|
|
126
127
|
},
|
|
127
|
-
"time": "
|
|
128
|
+
"time": "2025-03-30T21:06:30+00:00",
|
|
128
129
|
"type": "library",
|
|
129
130
|
"extra": {
|
|
130
131
|
"branch-alias": {
|
|
@@ -173,7 +174,7 @@
|
|
|
173
174
|
],
|
|
174
175
|
"support": {
|
|
175
176
|
"issues": "https://github.com/nette/utils/issues",
|
|
176
|
-
"source": "https://github.com/nette/utils/tree/v4.0.
|
|
177
|
+
"source": "https://github.com/nette/utils/tree/v4.0.6"
|
|
177
178
|
},
|
|
178
179
|
"install-path": "../nette/utils"
|
|
179
180
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
'name' => '__root__',
|
|
4
4
|
'pretty_version' => 'dev-main',
|
|
5
5
|
'version' => 'dev-main',
|
|
6
|
-
'reference' => '
|
|
6
|
+
'reference' => '53b0d437bebe1b115ebfbaf941ac81a3f787bf96',
|
|
7
7
|
'type' => 'library',
|
|
8
8
|
'install_path' => __DIR__ . '/../../',
|
|
9
9
|
'aliases' => array(),
|
|
@@ -13,25 +13,25 @@
|
|
|
13
13
|
'__root__' => array(
|
|
14
14
|
'pretty_version' => 'dev-main',
|
|
15
15
|
'version' => 'dev-main',
|
|
16
|
-
'reference' => '
|
|
16
|
+
'reference' => '53b0d437bebe1b115ebfbaf941ac81a3f787bf96',
|
|
17
17
|
'type' => 'library',
|
|
18
18
|
'install_path' => __DIR__ . '/../../',
|
|
19
19
|
'aliases' => array(),
|
|
20
20
|
'dev_requirement' => false,
|
|
21
21
|
),
|
|
22
22
|
'latte/latte' => array(
|
|
23
|
-
'pretty_version' => 'v3.0.
|
|
24
|
-
'version' => '3.0.
|
|
25
|
-
'reference' => '
|
|
23
|
+
'pretty_version' => 'v3.0.20',
|
|
24
|
+
'version' => '3.0.20.0',
|
|
25
|
+
'reference' => '4db7a5502f8cef02fffa84fc9c34a635d9c79d4d',
|
|
26
26
|
'type' => 'library',
|
|
27
27
|
'install_path' => __DIR__ . '/../latte/latte',
|
|
28
28
|
'aliases' => array(),
|
|
29
29
|
'dev_requirement' => false,
|
|
30
30
|
),
|
|
31
31
|
'nette/utils' => array(
|
|
32
|
-
'pretty_version' => 'v4.0.
|
|
33
|
-
'version' => '4.0.
|
|
34
|
-
'reference' => '
|
|
32
|
+
'pretty_version' => 'v4.0.6',
|
|
33
|
+
'version' => '4.0.6.0',
|
|
34
|
+
'reference' => 'ce708655043c7050eb050df361c5e313cf708309',
|
|
35
35
|
'type' => 'library',
|
|
36
36
|
'install_path' => __DIR__ . '/../nette/utils',
|
|
37
37
|
'aliases' => array(),
|
|
@@ -15,21 +15,22 @@
|
|
|
15
15
|
}
|
|
16
16
|
],
|
|
17
17
|
"require": {
|
|
18
|
-
"php": "8.0 - 8.
|
|
18
|
+
"php": "8.0 - 8.4",
|
|
19
19
|
"ext-json": "*",
|
|
20
20
|
"ext-tokenizer": "*"
|
|
21
21
|
},
|
|
22
22
|
"require-dev": {
|
|
23
|
-
"nette/tester": "^2.
|
|
24
|
-
"tracy/tracy": "^2.
|
|
25
|
-
"nette/utils": "^
|
|
23
|
+
"nette/tester": "^2.5",
|
|
24
|
+
"tracy/tracy": "^2.10",
|
|
25
|
+
"nette/utils": "^4.0",
|
|
26
26
|
"phpstan/phpstan": "^1",
|
|
27
|
-
"nette/php-generator": "^
|
|
27
|
+
"nette/php-generator": "^4.0"
|
|
28
28
|
},
|
|
29
29
|
"suggest": {
|
|
30
30
|
"ext-iconv": "to use filters |reverse, |substring",
|
|
31
31
|
"ext-mbstring": "to use filters like lower, upper, capitalize, ...",
|
|
32
32
|
"ext-fileinfo": "to use filter |datastream",
|
|
33
|
+
"ext-intl": "to use Latte\\Engine::setLocale()",
|
|
33
34
|
"nette/utils": "to use filter |webalize",
|
|
34
35
|
"nette/php-generator": "to use tag {templatePrint}"
|
|
35
36
|
},
|
|
@@ -1,18 +1,36 @@
|
|
|
1
|
-
[Latte
|
|
2
|
-
=============================================================================
|
|
1
|
+
[](https://latte.nette.org)
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
<!---->
|
|
4
|
+
|
|
5
|
+
<h3>
|
|
6
|
+
|
|
7
|
+
✅ The [only truly secure](https://latte.nette.org/en/safety-first) templating system for PHP<br>
|
|
8
|
+
✅ [You already know the syntax](https://latte.nette.org/en/syntax)<br>
|
|
6
9
|
✅ Highly mature, fast, and widely used library
|
|
7
10
|
|
|
8
|
-
|
|
11
|
+
</h3>
|
|
12
|
+
|
|
13
|
+
<!---->
|
|
14
|
+
|
|
15
|
+
Latte is the safest templating system for PHP. It is cleverly designed and easy to learn for those familiar with PHP, as they can quickly adopt its basic tags.
|
|
16
|
+
A wide range of useful features will significantly simplify your work. It provides top-notch protection against critical vulnerabilities and allows you to focus on creating high-quality applications without worrying about their security.
|
|
17
|
+
|
|
18
|
+
🟨 Only 1% of programmers [can pass this quiz](https://blog.nette.org/en/quiz-can-you-defend-against-xss-vulnerability)!
|
|
19
|
+
|
|
20
|
+
<!---->
|
|
21
|
+
|
|
22
|
+
Getting started
|
|
23
|
+
=======
|
|
24
|
+
|
|
25
|
+
<h3>
|
|
9
26
|
|
|
10
|
-
|
|
27
|
+
1️⃣ First, familiarize yourself with [Latte syntax](https://latte.nette.org/en/syntax) and [try it online](https://fiddle.nette.org/latte/#9cc0cf6d89)<br>
|
|
28
|
+
2️⃣ Take a look at the basic set of [tags](https://latte.nette.org/en/tags) and [filters](https://latte.nette.org/en/filters)<br>
|
|
29
|
+
3️⃣ Render a template with a [few lines of PHP code](https://latte.nette.org/en/develop)
|
|
11
30
|
|
|
12
|
-
|
|
13
|
-
- 2️⃣ Take a look at the basic set of [tags](https://latte.nette.org/en/tags) and [filters](https://latte.nette.org/en/filters)
|
|
14
|
-
- 3️⃣ Write templates in [editor with Latte support](https://latte.nette.org/en/recipes#toc-editors-and-ide)
|
|
31
|
+
</h3>
|
|
15
32
|
|
|
33
|
+
<!---->
|
|
16
34
|
|
|
17
35
|
Do you like Latte? Are you looking forward to the new features?
|
|
18
36
|
|
|
@@ -92,7 +92,10 @@ $colors = [
|
|
|
92
92
|
<h2>Parameters</h2>
|
|
93
93
|
|
|
94
94
|
<div class="tracy-inner">
|
|
95
|
-
|
|
95
|
+
<table class="tracy-sortable tracy-dump-seamless">
|
|
96
|
+
<?php foreach (reset($list)->template->getParameters() as $k => $v): ?>
|
|
97
|
+
<tr><th><?= Helpers::escapeHtml($k) ?></th><td><?= Dumper::toHtml($v, [Dumper::LIVE => true]) ?></td></tr>
|
|
98
|
+
<?php endforeach ?>
|
|
96
99
|
</div>
|
|
97
100
|
<?php endif ?>
|
|
98
101
|
</div>
|
|
@@ -66,7 +66,7 @@ final class TagLexer
|
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
/** @return Token[] */
|
|
69
|
-
public function tokenizePartially(string $input, Position &$position, int $ofs = null): array
|
|
69
|
+
public function tokenizePartially(string $input, Position &$position, ?int $ofs = null): array
|
|
70
70
|
{
|
|
71
71
|
$this->input = $input;
|
|
72
72
|
$this->offset = $ofs ?? $position->offset;
|