From d44b09263aa05b74f194858c2a0cb20b9f6adcf3 Mon Sep 17 00:00:00 2001 From: Marcel van Lohuizen Date: Thu, 12 Sep 2019 13:12:36 +0200 Subject: [PATCH] doc/tutorial/basics: some minor fixes preparing for transformation to Hugo, mostlyl Change-Id: Iac74644a5e781912fd1e45cc39f60baa05d27683 Reviewed-on: https://cue-review.googlesource.com/c/cue/+/3263 Reviewed-by: Marcel van Lohuizen --- doc/tutorial/basics/bytes.md | 4 ++-- doc/tutorial/basics/commas.md | 2 +- doc/tutorial/basics/commaslists.md | 2 +- doc/tutorial/basics/comments.md | 4 ++-- doc/tutorial/basics/curly.md | 2 +- doc/tutorial/basics/disjunctions.md | 1 + doc/tutorial/basics/fieldname.md | 2 +- doc/tutorial/basics/fold.md | 2 +- doc/tutorial/basics/foldany.md | 2 +- doc/tutorial/basics/numberlit.md | 2 +- doc/tutorial/basics/stringlit.md | 2 +- doc/tutorial/basics/stringraw.md | 8 +++----- doc/tutorial/basics/templates.md | 2 +- doc/tutorial/basics/types.md | 7 +------ 14 files changed, 18 insertions(+), 24 deletions(-) diff --git a/doc/tutorial/basics/bytes.md b/doc/tutorial/basics/bytes.md index 0d7cd00f1..6013e79a2 100644 --- a/doc/tutorial/basics/bytes.md +++ b/doc/tutorial/basics/bytes.md @@ -9,7 +9,7 @@ Bytes are converted to base64 when emitting JSON. Byte literals are defined with single quotes. The following additional escape sequences are allowed in byte literals: - \xnn // arbitrary byte value defined as a 2-digit hexadecimal number + \xnn // arbitrary byte value defined as a 2-digit hexadecimal number \nnn // arbitrary byte value defined as a 3-digit octal number @@ -19,7 +19,7 @@ _bytes.cue:_ a: '\x03abc' ``` - + `$ cue export bytes.cue` ```json { diff --git a/doc/tutorial/basics/commas.md b/doc/tutorial/basics/commas.md index e39dae3d8..6ee539b7e 100644 --- a/doc/tutorial/basics/commas.md +++ b/doc/tutorial/basics/commas.md @@ -25,7 +25,7 @@ _commas.cue:_ ``` - + `$ cue export commas.cue` ```json { diff --git a/doc/tutorial/basics/commaslists.md b/doc/tutorial/basics/commaslists.md index c10996200..a58cc79c1 100644 --- a/doc/tutorial/basics/commaslists.md +++ b/doc/tutorial/basics/commaslists.md @@ -18,7 +18,7 @@ _commas2.cue:_ ] ``` - + `$ cue export commas2.cue` ```json [ diff --git a/doc/tutorial/basics/comments.md b/doc/tutorial/basics/comments.md index e7404eed3..ead2ec8b6 100644 --- a/doc/tutorial/basics/comments.md +++ b/doc/tutorial/basics/comments.md @@ -14,11 +14,11 @@ one: 1 two: 2 // a line comment ``` - + `$ cue export comments.cue` ```json { "one": 1, - "two": 2, + "two": 2 } ``` \ No newline at end of file diff --git a/doc/tutorial/basics/curly.md b/doc/tutorial/basics/curly.md index b19dcf964..32ed49b72 100644 --- a/doc/tutorial/basics/curly.md +++ b/doc/tutorial/basics/curly.md @@ -17,7 +17,7 @@ two: 2 "two-and-a-half": 2.5 ``` - + `$ cue export curly.cue` ```json { diff --git a/doc/tutorial/basics/disjunctions.md b/doc/tutorial/basics/disjunctions.md index b4876c1fd..031a06825 100644 --- a/doc/tutorial/basics/disjunctions.md +++ b/doc/tutorial/basics/disjunctions.md @@ -12,6 +12,7 @@ It is an error for a concrete `conn` to define anything else than these two values. +_disjunctions.cue_ ``` conn: { address: string diff --git a/doc/tutorial/basics/fieldname.md b/doc/tutorial/basics/fieldname.md index 944b72475..54ba0ae6f 100644 --- a/doc/tutorial/basics/fieldname.md +++ b/doc/tutorial/basics/fieldname.md @@ -22,7 +22,7 @@ _fieldname.cue:_ } ``` - + `$ cue export fieldname.cue` ```json { diff --git a/doc/tutorial/basics/fold.md b/doc/tutorial/basics/fold.md index cb1eb0db6..b1967e451 100644 --- a/doc/tutorial/basics/fold.md +++ b/doc/tutorial/basics/fold.md @@ -12,7 +12,7 @@ _fold.cue:_ outer middle inner: 3 ``` - + `$ cue export fold.cue` ```json { diff --git a/doc/tutorial/basics/foldany.md b/doc/tutorial/basics/foldany.md index 0b6c938fd..5175d4b0b 100644 --- a/doc/tutorial/basics/foldany.md +++ b/doc/tutorial/basics/foldany.md @@ -16,7 +16,7 @@ outer middle1 inner: 3 outer middle2 inner: 7 ``` - + `$ cue export foldany.cue` ```json { diff --git a/doc/tutorial/basics/numberlit.md b/doc/tutorial/basics/numberlit.md index 382e6b2aa..0ee001b0f 100644 --- a/doc/tutorial/basics/numberlit.md +++ b/doc/tutorial/basics/numberlit.md @@ -18,7 +18,7 @@ _numlit.cue:_ ] ``` - + `$ cue export numlit.cue` ```json [ diff --git a/doc/tutorial/basics/stringlit.md b/doc/tutorial/basics/stringlit.md index 69c6c5afc..b21339238 100644 --- a/doc/tutorial/basics/stringlit.md +++ b/doc/tutorial/basics/stringlit.md @@ -27,7 +27,7 @@ b: """ """ ``` - + `$ cue export stringlit.cue` ```json { diff --git a/doc/tutorial/basics/stringraw.md b/doc/tutorial/basics/stringraw.md index cb0c903f3..d618984b9 100644 --- a/doc/tutorial/basics/stringraw.md +++ b/doc/tutorial/basics/stringraw.md @@ -27,12 +27,11 @@ msg2: ##""" """## ``` - + `$ cue eval stringraw.cue` ``` -{ - msg1: "The sequence \"\\U0001F604\" renders as 😄." - msg2: """ +msg1: "The sequence \"\\U0001F604\" renders as 😄." +msg2: """ A regular expression can conveniently be written as: #\"\\d{3}\"# @@ -40,5 +39,4 @@ msg2: ##""" This construct works for bytes, strings and their multi-line variants. """ -} ``` diff --git a/doc/tutorial/basics/templates.md b/doc/tutorial/basics/templates.md index 7220f1743..f24984dbe 100644 --- a/doc/tutorial/basics/templates.md +++ b/doc/tutorial/basics/templates.md @@ -32,7 +32,7 @@ job nginx: { } ``` - + `$ cue eval templates.cue` ``` job: { diff --git a/doc/tutorial/basics/types.md b/doc/tutorial/basics/types.md index 466a0fd0b..7f49e4c8f 100644 --- a/doc/tutorial/basics/types.md +++ b/doc/tutorial/basics/types.md @@ -7,12 +7,7 @@ _Types ~~and~~ are Values_ CUE defines the following basic types ``` -null -bool -string -bytes -int -float +null bool string bytes int float ``` in addition to the error type mentioned in the previous section.