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

Commit 1fb11d5

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

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

app/views/docs/functions-develop.phtml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2424,15 +2424,16 @@ export default function ({ res }) {
24242424
<h3>PHP</h3>
24252425
<div class="ide margin-top-small" data-lang="php" data-lang-label="PHP">
24262426
<pre class="line-numbers"><code class="prism language-php" data-prism>// src/utils.php
2427+
&lt;?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">
24332434
<pre class="line-numbers"><code class="prism language-php" data-prism>// src/main.php
2434-
2435-
include 'utils.php';
2435+
&lt;?php
2436+
require_once(__DIR__ . '/utils.php');
24362437

24372438
return function ($context) {
24382439
return $context->res->send(add(1, 2));
@@ -2442,14 +2443,14 @@ return function ($context) {
24422443
<li>
24432444
<h3>Python</h3>
24442445
<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
2446+
<pre class="line-numbers"><code class="prism language-python" data-prism># src/utils.py
24462447

24472448
def add(a, b):
24482449
return a + b;</code>
24492450
</pre>
24502451
</div>
24512452
<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
2453+
<pre class="line-numbers"><code class="prism language-python" data-prism># src/main.py
24532454

24542455
from .utils import add
24552456

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

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

0 commit comments

Comments
 (0)