Skip to content

Commit 0cd2df7

Browse files
committed
Update README
1 parent 9e77920 commit 0cd2df7

File tree

1 file changed

+26
-6
lines changed

1 file changed

+26
-6
lines changed

README.md

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,30 @@ directory, with the `.janet` suffix. If the binding includes the `/` character,
4747
an underscore - this works because no bindings in the core use an underscore. For example, the
4848
binding `array/new` has examples in the `examples/array_new.janet` file.
4949

50-
If such a file already exists, you can simply append your example code the existing file.
50+
To cope with some of Janet's symbols having names with characters that
51+
are not-so-friendly to certain filesystem and/or operating system
52+
combinations, an escaping scheme is used.
5153

52-
When building the site, the new examples will be included in the generated documentation. Make
53-
sure that your example has correct janet syntax, as syntax errors will cause the entire site
54-
to not build. If the example has valid syntax (has a 0 exit code when loaded with
55-
`janet -k example/my-fn.janet`), there may be a bug in the mendoza janet syntax
56-
highlighter and you open a bug in mendoza.
54+
For a given symbol, use the `content/examples.janet` script to
55+
generate an appropriate filename. For example, for `array/new`,
56+
invoking:
57+
58+
```
59+
$ janet content/examples.janet array/new
60+
```
61+
62+
should give the output:
63+
64+
```
65+
array_47new.janet
66+
```
67+
68+
If such a file already exists, you can simply append your example code
69+
to the existing file.
70+
71+
When building the site, the new examples will be included in the
72+
generated documentation. Make sure that your example has correct janet
73+
syntax, as syntax errors will cause the entire site to not build. If
74+
the example has valid syntax (has a 0 exit code when loaded with
75+
`janet -k example/my-fn.janet`), there may be a bug in the mendoza
76+
janet syntax highlighter in which case please open a bug in mendoza.

0 commit comments

Comments
 (0)