Skip to content

Commit a3abcab

Browse files
committed
Replaced `` with in README
1 parent 3d5b97e commit a3abcab

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

README.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ end
8585
- [x] Multiline conditions: all the same + elseif statements, switches, nesting
8686
- [x] Variables: assignments, constants, global variables, temporary variables, visits, lists
8787
- [x] Lists: logical operations, multivalued lists, multi-list lists, all the queries, work with numbers
88-
- [x] Game queries: all the queries without ```TURNS()``` and ```TURNS_SINCE()```
88+
- [x] Game queries: all the queries without `TURNS()` and `TURNS_SINCE()```
8989
- [x] State: saving and loading
9090
- [x] Integration: external functions, variables observing, jumping
9191
- [x] Migration: the ability to implement the migration of player's saves after the book update
@@ -101,10 +101,10 @@ end
101101
### Known limitations
102102

103103
- Choice's title can't contain inline conditions or alternatives
104-
- Choice can't have few conditions like ```* { a } { b }```. *The solution is using ```* { a && b } ``` instead.*
105-
- There is no query functions ```TURNS()``` and ```TURNS_SINCE()```
106-
- A list uses only standard numerical values ```1, 2, 3...```. Can't define your own numerical values like ```4, 7, 12...```.
107-
- A comment in the middle of the paragraph ```before /* comment */ and after``` splits it into two paragraphs ```before``` and ```and after```
104+
- Choice can't have few conditions like `* { a } { b }`. *The solution is using `* { a && b } ` instead.*
105+
- There is no query functions `TURNS()` and `TURNS_SINCE()```
106+
- A list uses only standard numerical values `1, 2, 3...`. Can't define your own numerical values like `4, 7, 12...`.
107+
- A comment in the middle of the paragraph `before /* comment */ and after` splits it into two paragraphs `before` and `and after```
108108

109109
## Alternatives
110110

@@ -118,7 +118,7 @@ end
118118

119119
### Common case (Löve, pure Lua, etc.)
120120

121-
Download the latest [release archive](https://github.com/astrochili/narrator/releases) and require the ```narrator``` module.
121+
Download the latest [release archive](https://github.com/astrochili/narrator/releases) and require the `narrator` module.
122122

123123
```lua
124124
local narrator = require('narrator.narrator')
@@ -130,7 +130,7 @@ Narrator requires [lpeg](http://www.inf.puc-rio.br/~roberto/lpeg/) as dependency
130130
$ luarocks install lpeg
131131
```
132132

133-
In fact, you don't need ```lpeg``` in the release, but you need it locally to parse Ink content and generate lua versions of books to play in your game. Use parsing in development only, prefer already parsed and stored books in production.
133+
In fact, you don't need `lpeg` in the release, but you need it locally to parse Ink content and generate lua versions of books to play in your game. Use parsing in development only, prefer already parsed and stored books in production.
134134

135135
### Defold
136136

@@ -141,7 +141,7 @@ https://github.com/astrochili/narrator/archive/master.zip
141141
https://github.com/astrochili/defold-lpeg/archive/master.zip
142142
```
143143

144-
Then you can require the ```narrator``` module.
144+
Then you can require the `narrator` module.
145145

146146
```lua
147147
local narrator = require('narrator.narrator')
@@ -151,9 +151,9 @@ local narrator = require('narrator.narrator')
151151

152152
### narrator.parse_file(path, params)
153153

154-
Parses the Ink file at path with all the inclusions and returns a book instance. Path notations ```'stories/game.ink'```, ```'stories/game'``` and ```'stories.game'``` are valid.
154+
Parses the Ink file at path with all the inclusions and returns a book instance. Path notations `'stories/game.ink'`, `'stories/game'` and `'stories.game'` are valid.
155155

156-
You can save a parsed book to the lua file with the same path by passing ```{ save = true }``` as ```params``` table. By default, the ```params``` table is ```{ save = false }```.
156+
You can save a parsed book to the lua file with the same path by passing `{ save = true }` as `params` table. By default, the `params` table is `{ save = false }`.
157157

158158
```lua
159159
-- Parse a Ink file at path 'stories/game.ink'
@@ -163,11 +163,11 @@ local book = narrator.parse_file('stories.game')
163163
-- and save the book at path 'stories/game.lua'
164164
local book = narrator.parse_file('stories.game', { save = true })
165165
```
166-
Reading and saving files required ```io``` so if you can't work with files by this way use ```narrator.parse_content()```.
166+
Reading and saving files required `io` so if you can't work with files by this way use `narrator.parse_content()`.
167167

168168
### narrator.parse_content(content, inclusions)
169169

170-
Parses the string with Ink content and returns a book instance. The ```inclusions``` param is optional and can be used to pass an array of strings with Ink content of inclusions.
170+
Parses the string with Ink content and returns a book instance. The `inclusions` param is optional and can be used to pass an array of strings with Ink content of inclusions.
171171

172172
```lua
173173
local content = 'Content of a root Ink file'
@@ -183,11 +183,11 @@ local book = narrator.parse_content(content)
183183
local book = narrator.parse_content(content, inclusions)
184184
```
185185

186-
Content parsing is useful when you should manage files by your engine environment and don't want to use ```io``` module. For example, in Defold, you may want to load ink files as custom resources with [sys.load_resource()](https://defold.com/ref/sys/#sys.load_resource:filename).
186+
Content parsing is useful when you should manage files by your engine environment and don't want to use `io` module. For example, in Defold, you may want to load ink files as custom resources with [sys.load_resource()](https://defold.com/ref/sys/#sys.load_resource:filename).
187187

188188
### narrator.init_story(book)
189189

190-
Inits a story instance from the book. This is aclual to use in production. For example, just load a book with ```require()``` and pass it to this function.
190+
Inits a story instance from the book. This is aclual to use in production. For example, just load a book with `require()` and pass it to this function.
191191

192192
```lua
193193
-- Require a parsed and saved before book
@@ -213,11 +213,11 @@ end
213213

214214
### story:continue(steps)
215215

216-
Get the next paragraphs. You can specify the number of paragraphs that you want to pull by the ```steps``` param.
217-
- Pass nothing if you want to get all the currently available paragraphs. ```0``` also works.
218-
- Pass ```1``` if you want to get one next paragraph without wrapping to array.
216+
Get the next paragraphs. You can specify the number of paragraphs that you want to pull by the `steps` param.
217+
- Pass nothing if you want to get all the currently available paragraphs. `0` also works.
218+
- Pass `1` if you want to get one next paragraph without wrapping to array.
219219

220-
A paragraph is a table like ```{ text = 'Hello.', tags = { 'tag1', 'tag2' } }```. Most of the paragraphs do not have tags so ```tags``` can be ```nil```.
220+
A paragraph is a table like `{ text = 'Hello.', tags = { 'tag1', 'tag2' } }`. Most of the paragraphs do not have tags so `tags` can be `nil`.
221221

222222

223223
```lua
@@ -230,7 +230,7 @@ local paragraph = story:continue(1)
230230

231231
### story:can_choose()
232232

233-
Returns a boolean, does the story have choices to output or not. Also returns ```false``` if there are available paragraphs to continue.
233+
Returns a boolean, does the story have choices to output or not. Also returns `false` if there are available paragraphs to continue.
234234

235235
```lua
236236
if story:can_choose() do
@@ -242,9 +242,9 @@ end
242242

243243
Returns an array of available choices. Returns an empty array if there are available paragraphs to continue.
244244

245-
A choice is a table like ```{ text = 'Bye.', tags = { 'tag1', 'tag2' } }```. Most of the choices do not have tags so ```tags``` can be ```nil```.
245+
A choice is a table like `{ text = 'Bye.', tags = { 'tag1', 'tag2' } }`. Most of the choices do not have tags so `tags` can be `nil`.
246246

247-
Choice tags are not an official feature of Ink, but it's a Narrator feature. These tags also will appear in the answer paragraph as it works in Ink by default. But if you have a completely eaten choice like ```'[Answer] #tag'``` you will receive tags only in the choice.
247+
Choice tags are not an official feature of Ink, but it's a Narrator feature. These tags also will appear in the answer paragraph as it works in Ink by default. But if you have a completely eaten choice like `'[Answer] #tag'` you will receive tags only in the choice.
248248

249249
```lua
250250
-- Get available choices and output them to the player
@@ -256,7 +256,7 @@ Choice tags are not an official feature of Ink, but it's a Narrator feature. The
256256

257257
### story:choose(index)
258258

259-
Make a choice to continue the story. Pass the ```index``` of the choice that you was received with ```get_choices()``` before. Will do nothing if ```can_continue()``` returns ```false```.
259+
Make a choice to continue the story. Pass the `index` of the choice that you was received with `get_choices()` before. Will do nothing if `can_continue()` returns `false`.
260260

261261
```lua
262262
-- Get the answer from the player in the terminal
@@ -271,7 +271,7 @@ Make a choice to continue the story. Pass the ```index``` of the choice that you
271271

272272
### story:jump_to(path_string)
273273

274-
Jumps to the path. The ```path_string``` param is a string like ```'knot.stitch.label'```.
274+
Jumps to the path. The `path_string` param is a string like `'knot.stitch.label'`.
275275

276276
```lua
277277
-- Jump to the maze stitch in the adventure knot
@@ -283,7 +283,7 @@ Jumps to the path. The ```path_string``` param is a string like ```'knot.stitch.
283283

284284
### story:get_visits(path_string)
285285

286-
Returns the number of visits to the path. The ```path_string``` param is a string like ```'knot.stitch.label'```.
286+
Returns the number of visits to the path. The `path_string` param is a string like `'knot.stitch.label'`.
287287

288288
```lua
289289
-- Get the number of visits to the maze's red room
@@ -295,7 +295,7 @@ local adventure_visits = story:get_visits('adventure')
295295

296296
### story:get_tags(path_string)
297297

298-
Returns tags for the path. The ```path_string``` param is a string like ```'knot.stitch'```. This function is useful when you want to get tags before continue the story and pull paragraphs. Read more about it [here](https://github.com/inkle/ink/blob/master/Documentation/RunningYourInk.md#knot-tags).
298+
Returns tags for the path. The `path_string` param is a string like `'knot.stitch'`. This function is useful when you want to get tags before continue the story and pull paragraphs. Read more about it [here](https://github.com/inkle/ink/blob/master/Documentation/RunningYourInk.md#knot-tags).
299299

300300
```lua
301301
-- Get tags for the path 'adventure.maze'
@@ -404,7 +404,7 @@ This is the place where you can rename or change variables, visits, update the c
404404
function(state, old_version, new_version) return state end
405405
```
406406

407-
The ```old_version``` is the version of the saved state, the ```new_version``` is the version of the book. You can specify the verson of the book with the constant ```'version'``` in the Ink content, otherwise it's equal to ```0```.
407+
The `old_version` is the version of the saved state, the `new_version` is the version of the book. You can specify the verson of the book with the constant `'version'` in the Ink content, otherwise it's equal to `0`.
408408

409409
```lua
410410
-- A migration function example
@@ -446,9 +446,9 @@ There are some useful extensions and configs for [VSCode](https://code.visualstu
446446

447447
- [Local Lua Debugger](https://github.com/tomblind/local-lua-debugger-vscode) by [tomblind](https://github.com/tomblind/).
448448
- [Lua Language Server](https://github.com/sumneko/lua-language-server) by [sunmeko](https://github.com/sumneko).
449-
- A task named ```Busted``` runs tests with ```tests/run.lua```.
450-
- A lunch configuration named ```Busted``` runs the debugger with ```tests/run.lua```.
451-
- A lunch configuration named ```Debug``` runs the debugger with ```debug.lua```.
449+
- A task named `Busted` runs tests with `tests/run.lua`.
450+
- A lunch configuration named `Busted` runs the debugger with `tests/run.lua`.
451+
- A lunch configuration named `Debug` runs the debugger with `debug.lua`.
452452

453453
### Testing
454454

0 commit comments

Comments
 (0)