@@ -47,10 +47,30 @@ directory, with the `.janet` suffix. If the binding includes the `/` character,
4747an underscore - this works because no bindings in the core use an underscore. For example, the
4848binding ` 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