Skip to content

Commit

Permalink
fixup! add lua code block marks
Browse files Browse the repository at this point in the history
  • Loading branch information
hishamhm committed Sep 2, 2024
1 parent f4148c4 commit 3bfb29e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/pragmas.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Teal now features _optional function arguments_. if an argument can be
optionally elided, you now can, or rather, have to, annotate it explicitly
adding a `?` to its name:

```
```lua
local function greet(greeting: string, name?: string)
if name then
print(string.format("%s, %s!", greeting, name))
Expand All @@ -58,7 +58,7 @@ function arity checks.
You can enable or disable arity checks using the `arity` pragma. Let's first
assume we have an old library written for older versions of Teal:

```
```lua
-- old_library.tl
local record old_library
end
Expand All @@ -79,7 +79,7 @@ Now we want to use this library with the current version of Teal, but we don't
want to lose arity checks in our own code. We can temporarily disable arity
checks, require the library, then re-enable them:

```
```lua
--#pragma arity off
local old_library = require("old_library)
--#pragma arity on
Expand Down

0 comments on commit 3bfb29e

Please sign in to comment.