docs: org footnotes are not supported by github
This commit is contained in:
parent
15104288b3
commit
ecb24deb40
16
README.org
16
README.org
|
@ -14,13 +14,13 @@ When parsing and building TOML documents, guile-toml follows [[https://github.co
|
||||||
|
|
||||||
| TOML | Guile |
|
| TOML | Guile |
|
||||||
|----------------+---------------------|
|
|----------------+---------------------|
|
||||||
| string | string [fn:0] |
|
| string | string [0] |
|
||||||
| key-value pair | alist |
|
| key-value pair | alist |
|
||||||
| array | vector |
|
| array | vector |
|
||||||
| integer/float | real |
|
| integer/float | real |
|
||||||
| true | #t |
|
| true | #t |
|
||||||
| false | #f |
|
| false | #f |
|
||||||
| datetime | SRFI-19 date [fn:1] |
|
| datetime | SRFI-19 date [1] |
|
||||||
| nan | +nan.0 |
|
| nan | +nan.0 |
|
||||||
| ±inf | ±inf.0 |
|
| ±inf | ±inf.0 |
|
||||||
|
|
||||||
|
@ -29,9 +29,9 @@ To start using guile-toml:
|
||||||
(use-modules (toml))
|
(use-modules (toml))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
[fn:0] TOML's default behaviour for invalid UTF-8 is to fail, whereas [[https://www.gnu.org/software/guile/manual/html_node/Encoding.html][Guile's default behavior]] is to replace invalid UTF-8 with <20>. If you prefer TOML's behavior, use ~(set-port-conversion-strategy! (current-input-port) 'error)~.
|
[0]: TOML's default behaviour for invalid UTF-8 is to fail, whereas [[https://www.gnu.org/software/guile/manual/html_node/Encoding.html][Guile's default behavior]] is to replace invalid UTF-8 with the replacement character <20>. If you prefer TOML's behavior, use ~(set-port-conversion-strategy! (current-input-port) 'error)~.
|
||||||
|
|
||||||
[fn:1] TOML's ~time-local~ is parsed same as a ~datetime-local~ on the date of ~1970-01-01~.
|
[1]: TOML's ~time-local~ is parsed same as a ~datetime-local~ on the date of ~1970-01-01~.
|
||||||
|
|
||||||
*** Reading TOML documents
|
*** Reading TOML documents
|
||||||
|
|
||||||
|
@ -48,19 +48,15 @@ To start using guile-toml:
|
||||||
- Basic ~toml->scm~ usage:
|
- Basic ~toml->scm~ usage:
|
||||||
#+begin_src scheme
|
#+begin_src scheme
|
||||||
> (toml->scm "[a]\n b.c = \"hi world\"")
|
> (toml->scm "[a]\n b.c = \"hi world\"")
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+begin_src scheme
|
|
||||||
(("a" ("b" ("c" . "hi world"))))
|
(("a" ("b" ("c" . "hi world"))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
- Read a TOML file and parse it (example[fn:2] from [[https://toml.io][toml.io]]):
|
- Read a TOML file and parse it (example from [[https://toml.io][toml.io]]):
|
||||||
#+begin_src scheme
|
#+begin_src scheme
|
||||||
> (use-modules (toml) (ice-9 textual-ports))
|
> (use-modules (toml) (ice-9 textual-ports))
|
||||||
> (toml->scm (call-with-input-file "example.toml" get-string-all))
|
> (toml->scm (call-with-input-file "example.toml" get-string-all))
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+begin_src scheme
|
|
||||||
(("servers"
|
(("servers"
|
||||||
("beta" ("role" . "backend") ("ip" . "10.0.0.2"))
|
("beta" ("role" . "backend") ("ip" . "10.0.0.2"))
|
||||||
("alpha"
|
("alpha"
|
||||||
|
@ -79,7 +75,7 @@ To start using guile-toml:
|
||||||
("title" . "TOML Example"))
|
("title" . "TOML Example"))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
[fn:2]
|
~example.toml~:
|
||||||
#+begin_src toml
|
#+begin_src toml
|
||||||
# This is a TOML document
|
# This is a TOML document
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue