Skip to content

Commit 0ad0f5d

Browse files
authored
Fix formatting of table & requires in create-packages.md (#1541)
Fix: - `to the highest version. ` was rendered to another line instead of within table - `requires` template was written as `require`
1 parent 5f4d8dc commit 0ad0f5d

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

nimble-guide/docs/create-packages.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,7 @@ There are several version selector operators you can use:
181181
| `>=` | Install _at least_ the provided version. |
182182
| `<=` | Install _at most_ the provided version. |
183183
| `^=` | Install the latest compatible version according to [semver](https://semver.npmjs.com/). |
184-
| `~=` | Install the latest version by increasing the last given digit
185-
to the highest version.
184+
| `~=` | Install the latest version by increasing the last given digit to the highest version. |
186185

187186

188187
Here are some examples of the `^=` and `~=` operators:
@@ -234,7 +233,7 @@ This can be achieved as follows:
234233

235234
```nim
236235
feature "chronos":
237-
require "chronos"
236+
requires "chronos"
238237
```
239238

240239
In this example, `chronos` will only be installed when the `chronos` feature is activated.
@@ -247,12 +246,12 @@ There are two ways to activate a feature:
247246
```
248247
2. By activating it in a dependency using the `[]` operator:
249248
```nim
250-
require "awesomeAsyncPackage[chronos]"
249+
requires "awesomeAsyncPackage[chronos]"
251250
```
252251

253252
Multiple features can be activated for a package as follows:
254253
```nim
255-
require "awesomeAsyncPackage[chronos, feature2]"
254+
requires "awesomeAsyncPackage[chronos, feature2]"
256255
```
257256

258257
#### Checking Active Features in Code
@@ -276,13 +275,13 @@ It is useful for requiring development-specific dependencies.
276275
For example:
277276
```nim
278277
feature "dev":
279-
require "unittest2"
278+
requires "unittest2"
280279
```
281280

282281
Since the `dev` feature is used frequently, an alias is available:
283282
```nim
284283
dev:
285-
require "unittest2"
284+
requires "unittest2"
286285
```
287286

288287

0 commit comments

Comments
 (0)