Skip to content

Commit 6b09cad

Browse files
Fix code blocks in routes.md (#700)
Fixed a couple of code blocks in the routes.md file that was causing improper formatting/styling. Co-authored-by: Renan <[email protected]>
1 parent 5aff838 commit 6b09cad

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

β€Ždocs/docs/basics/routes.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ Response onRequest(RequestContext context, String userId, String postId) {
418418

419419
## Wildcard Routes β™Ύ
420420

421-
Dart Frog supports wildcard routes. For example, if you create a file called `routes/posts/[...page].dart`, then it will be accessible at any path that starts with `/posts/`, with any number of levels, allowing it to called from `/posts/today`, `/posts/features/stared`, and so forth.
421+
Dart Frog supports wildcard routes. For example, if you create a file called `routes/posts/[...page].dart`, then it will be accessible at any path that starts with `/posts/`, with any number of levels, allowing it to called from `/posts/today`, `/posts/features/starred`, and so forth.
422422

423423
Routing parameters are forwarded to the `onRequest` method as seen below:
424424

@@ -432,6 +432,7 @@ Response onRequest(RequestContext context, String page) {
432432

433433
```warning
434434
Wildcard routes **must** be unique leaf routes on their route node, meaning that they need to be a file, and they need to be the only route in their folder.
435+
```
435436

436437
## Route Conflicts πŸ’₯
437438

@@ -442,13 +443,11 @@ A route conflict occurs when more than one route handler resolves to the same en
442443
For example, given the following file structure:
443444

444445
```
445-
446446
β”œβ”€β”€ routes
447447
β”‚Β Β  β”œβ”€β”€ api
448448
β”‚Β Β  β”‚Β Β  └── index.dart
449449
β”‚Β Β  └── api.dart
450-
451-
````
450+
```
452451

453452
Both `routes/api/index.dart` and `routes/api.dart` resolve the the `/api` endpoint.
454453

@@ -458,7 +457,7 @@ When running the development server via `dart_frog dev`, Dart Frog will report r
458457
[hotreload] - Application reloaded.
459458

460459
Route conflict detected. `routes/api.dart` and `routes/api/index.dart` both resolve to `/api`.
461-
````
460+
```
462461

463462
When generating a production build via `dart_frog build`, Dart Frog will report all detected route conflicts and fail the build if one or more route conflicts are detected.
464463

0 commit comments

Comments
Β (0)