Skip to content
This repository was archived by the owner on Sep 29, 2023. It is now read-only.

Commit 51ef0c6

Browse files
committed
Fix code splitting docs
Some of the examples were incorrect.
1 parent 1294cfb commit 51ef0c6

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

app/views/docs/functions-develop.phtml

+10-6
Original file line numberDiff line numberDiff line change
@@ -2423,16 +2423,18 @@ export default function ({ res }) {
24232423
<li>
24242424
<h3>PHP</h3>
24252425
<div class="ide margin-top-small" data-lang="php" data-lang-label="PHP">
2426-
<pre class="line-numbers"><code class="prism language-php" data-prism>// src/utils.php
2426+
<pre class="line-numbers"><code class="prism language-php" data-prism>&lt;?php
2427+
// src/utils.php
24272428

24282429
function add($a, $b) {
24292430
return $a + $b;
24302431
}</code></pre>
24312432
</div>
24322433
<div class="ide margin-top-small" data-lang="php" data-lang-label="PHP">
2433-
<pre class="line-numbers"><code class="prism language-php" data-prism>// src/main.php
2434+
<pre class="line-numbers"><code class="prism language-php" data-prism>&lt;?php
2435+
// src/main.php
24342436

2435-
include 'utils.php';
2437+
require_once(__DIR__ . '/utils.php');
24362438

24372439
return function ($context) {
24382440
return $context->res->send(add(1, 2));
@@ -2442,14 +2444,14 @@ return function ($context) {
24422444
<li>
24432445
<h3>Python</h3>
24442446
<div class="ide margin-top-small" data-lang="python" data-lang-label="Python">
2445-
<pre class="line-numbers"><code class="prism language-python" data-prism>// src/utils.py
2447+
<pre class="line-numbers"><code class="prism language-python" data-prism># src/utils.py
24462448

24472449
def add(a, b):
2448-
return a + b;</code>
2450+
return a + b</code>
24492451
</pre>
24502452
</div>
24512453
<div class="ide margin-top-small" data-lang="python" data-lang-label="Python">
2452-
<pre class="line-numbers"><code class="prism language-python" data-prism>// src/main.py
2454+
<pre class="line-numbers"><code class="prism language-python" data-prism># src/main.py
24532455

24542456
from .utils import add
24552457

@@ -2508,6 +2510,8 @@ int add(int a, int b) {
25082510
<pre class="line-numbers"><code class="prism language-dart" data-prism>// lib/main.dart
25092511
import 'dart:async';
25102512

2513+
import 'package:package_name/utils.dart';
2514+
25112515
Future&lt;dynamic> main(final context) async {
25122516
return context.res.send(add(1, 2));
25132517
}</code></pre>

0 commit comments

Comments
 (0)