diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 9d5ecbc..b92e1e2 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -10,7 +10,7 @@ jobs:
build:
strategy:
matrix:
- go-version: [1.20.x]
+ go-version: [1.21.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
diff --git a/.gitignore b/.gitignore
index d9e18a4..5a81918 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,7 +2,9 @@
.DS_Store
vendor
-examples/*.svg
+
+# Hiding the SVG output files introduces friction when adding a new TXT,SVG pair to the test suite.
+# examples/*.svg
cmd/tmpl-expand/tmpl-expand
cmd/goat/goat
diff --git a/README.md b/README.md
index d7eff71..16bda42 100644
--- a/README.md
+++ b/README.md
@@ -176,13 +176,13 @@ Note that '·' above is not ASCII, but rather Unicode, the MIDDLE DOT character,
### Small Grids
```
- ___ ___ .---+---+---+---+---. .---+---+---+---. .---. .---.
- ___/ \___/ \ | | | | | | / \ / \ / \ / \ / | +---+ |
- / \___/ \___/ +---+---+---+---+---+ +---+---+---+---+ +---+ +---+
- \___/ b \___/ \ | | | b | | | \ / \a/ \b/ \ / \ | +---+ |
- / a \___/ \___/ +---+---+---+---+---+ +---+---+---+---+ +---+ b +---+
- \___/ \___/ \ | | a | | | | / \ / \ / \ / \ / | a +---+ |
- \___/ \___/ '---+---+---+---+---' '---+---+---+---' '---' '---'
+ ___ ___ .---+---+---+---+---. .---+---+---+---. .---. .---. .---. .---. .-. .-. 0
+ ___/ \___/ \ | | | | | | / \ / \ / \ / \ / | +---+ | | A | | B | | A | | B | 1
+ / \___/ \___/ +---+---+---+---+---+ +---+---+---+---+ +---+ +---+ '---' '---' '-' '-' 2
+ \___/ b \___/ \ | | | b | | | \ / \a/ \b/ \ / \ | +---+ | .---. .---. .-. .-. 3
+ / a \___/ \___/ +---+---+---+---+---+ +---+---+---+---+ +---+ b +---+ | C | | D | | C | | D | 4
+ \___/ \___/ \ | | a | | | | / \ / \ / \ / \ / | a +---+ | '---' '---' '-' '-' 5
+ \___/ \___/ '---+---+---+---+---' '---+---+---+---' '---' '---' 0123456789012345678901234 6
```
diff --git a/examples/arrows.svg b/examples/arrows.svg
index f0fcafa..69f9ce9 100644
--- a/examples/arrows.svg
+++ b/examples/arrows.svg
@@ -5,6 +5,7 @@ svg {
}
@media (prefers-color-scheme: dark) {
svg {
+ color-scheme: dark; /* ask the browser for a dark background */
color: #FFFFFF;
}
}
diff --git a/examples/big-grids.svg b/examples/big-grids.svg
index fb32bfd..4a07d1e 100644
--- a/examples/big-grids.svg
+++ b/examples/big-grids.svg
@@ -5,6 +5,7 @@ svg {
}
@media (prefers-color-scheme: dark) {
svg {
+ color-scheme: dark; /* ask the browser for a dark background */
color: #FFFFFF;
}
}
diff --git a/examples/big-shapes.svg b/examples/big-shapes.svg
index 4a54725..a7ed0d5 100644
--- a/examples/big-shapes.svg
+++ b/examples/big-shapes.svg
@@ -5,6 +5,7 @@ svg {
}
@media (prefers-color-scheme: dark) {
svg {
+ color-scheme: dark; /* ask the browser for a dark background */
color: #FFFFFF;
}
}
diff --git a/examples/block-characters.svg b/examples/block-characters.svg
new file mode 100644
index 0000000..56c67d0
--- /dev/null
+++ b/examples/block-characters.svg
@@ -0,0 +1,55 @@
+
diff --git a/examples/block-characters.txt b/examples/block-characters.txt
new file mode 100644
index 0000000..27a2820
--- /dev/null
+++ b/examples/block-characters.txt
@@ -0,0 +1,3 @@
+Special cases supported by Markdeep:
+
+▉ ▓ ▒ ░
diff --git a/examples/circle.svg b/examples/circle.svg
index 54d61df..09ea07b 100644
--- a/examples/circle.svg
+++ b/examples/circle.svg
@@ -5,6 +5,7 @@ svg {
}
@media (prefers-color-scheme: dark) {
svg {
+ color-scheme: dark; /* ask the browser for a dark background */
color: #FFFFFF;
}
}
diff --git a/examples/circuits.svg b/examples/circuits.svg
index e1ccde2..9c9b0a8 100644
--- a/examples/circuits.svg
+++ b/examples/circuits.svg
@@ -5,6 +5,7 @@ svg {
}
@media (prefers-color-scheme: dark) {
svg {
+ color-scheme: dark; /* ask the browser for a dark background */
color: #FFFFFF;
}
}
diff --git a/examples/complicated.svg b/examples/complicated.svg
index 5ebca64..20b5498 100644
--- a/examples/complicated.svg
+++ b/examples/complicated.svg
@@ -5,6 +5,7 @@ svg {
}
@media (prefers-color-scheme: dark) {
svg {
+ color-scheme: dark; /* ask the browser for a dark background */
color: #FFFFFF;
}
}
diff --git a/examples/debug.svg b/examples/debug.svg
new file mode 100644
index 0000000..3184e56
--- /dev/null
+++ b/examples/debug.svg
@@ -0,0 +1,73 @@
+
diff --git a/examples/debug.txt b/examples/debug.txt
new file mode 100644
index 0000000..d9bdf2a
--- /dev/null
+++ b/examples/debug.txt
@@ -0,0 +1,34 @@
+
+ (
+
+ (
+
+ )
+
+ (
+
+ a()
+
+ a()
+
+ ()
+
+ ()
+
+ ||
+ --))--
+ ||
+
+ ||
+ --((--
+ ||
+
+ | |
+--)-)--
+ | |
+
+ | |
+--(-(--
+ | |
+
+o-
diff --git a/examples/dot-grids.svg b/examples/dot-grids.svg
index 9648aaf..6c46cc7 100644
--- a/examples/dot-grids.svg
+++ b/examples/dot-grids.svg
@@ -5,6 +5,7 @@ svg {
}
@media (prefers-color-scheme: dark) {
svg {
+ color-scheme: dark; /* ask the browser for a dark background */
color: #FFFFFF;
}
}
diff --git a/examples/edge-cases.svg b/examples/edge-cases.svg
index df810d6..aa8370c 100644
--- a/examples/edge-cases.svg
+++ b/examples/edge-cases.svg
@@ -5,6 +5,7 @@ svg {
}
@media (prefers-color-scheme: dark) {
svg {
+ color-scheme: dark; /* ask the browser for a dark background */
color: #FFFFFF;
}
}
diff --git a/examples/flow-chart.svg b/examples/flow-chart.svg
index 4a84530..6f575e7 100644
--- a/examples/flow-chart.svg
+++ b/examples/flow-chart.svg
@@ -5,6 +5,7 @@ svg {
}
@media (prefers-color-scheme: dark) {
svg {
+ color-scheme: dark; /* ask the browser for a dark background */
color: #FFFFFF;
}
}
diff --git a/examples/graphics.svg b/examples/graphics.svg
index e2ee3ba..eb36223 100644
--- a/examples/graphics.svg
+++ b/examples/graphics.svg
@@ -5,6 +5,7 @@ svg {
}
@media (prefers-color-scheme: dark) {
svg {
+ color-scheme: dark; /* ask the browser for a dark background */
color: #FFFFFF;
}
}
diff --git a/examples/half-step-bugs.svg b/examples/half-step-bugs.svg
new file mode 100644
index 0000000..1b4a124
--- /dev/null
+++ b/examples/half-step-bugs.svg
@@ -0,0 +1,69 @@
+
diff --git a/examples/half-step-bugs.txt b/examples/half-step-bugs.txt
new file mode 100644
index 0000000..1c9abb9
--- /dev/null
+++ b/examples/half-step-bugs.txt
@@ -0,0 +1,12 @@
+
+ _
+|_|
+
+double-draw
+
+
+ _
+| |
+|_|
+
+gap at abutting line ends
diff --git a/examples/hollow-circle.svg b/examples/hollow-circle.svg
new file mode 100644
index 0000000..8e2f285
--- /dev/null
+++ b/examples/hollow-circle.svg
@@ -0,0 +1,150 @@
+
diff --git a/examples/hollow-circle.txt b/examples/hollow-circle.txt
new file mode 100644
index 0000000..f821866
--- /dev/null
+++ b/examples/hollow-circle.txt
@@ -0,0 +1,50 @@
+-o
+ * * o o
+ 0123456
+
+
+
+->o o<-
+
+-> x x <-
+ xxxx
+
+ <--->
+ <--->
+
+ o<--->o
+ o<--->o
+
+
+ <-->
+ <-->
+
+ o<-->o
+ o<-->o
+
+
+ <-> < >
+ <-> < >
+
+ o<->o o< >o
+ o<->o o< >o
+
+
+ <>
+ <>
+
+ o<>o
+ o<>o
+
+
+oo
+^^
+||
+vv
+oo
+
+** --
+^^
+||
+vv
+** --
diff --git a/examples/icons.svg b/examples/icons.svg
index dd32e66..97f002f 100644
--- a/examples/icons.svg
+++ b/examples/icons.svg
@@ -5,6 +5,7 @@ svg {
}
@media (prefers-color-scheme: dark) {
svg {
+ color-scheme: dark; /* ask the browser for a dark background */
color: #FFFFFF;
}
}
diff --git a/examples/incompatibilities.svg b/examples/incompatibilities.svg
new file mode 100644
index 0000000..31ceaa3
--- /dev/null
+++ b/examples/incompatibilities.svg
@@ -0,0 +1,355 @@
+
diff --git a/examples/incompatibilities.txt b/examples/incompatibilities.txt
new file mode 100644
index 0000000..a5828bd
--- /dev/null
+++ b/examples/incompatibilities.txt
@@ -0,0 +1,31 @@
+Input TXT patterns supported by MarkDeep, but not by Goat.
+
+
+Hollow circles
+
+ o
+
+ Rendered to SVG as a "hollow" circle, transparent to background.
+ Goat-specific alternative rendering options are available on the command line.
+
+
+Alternative TXT patterns to indicate double-width circles:
+
+ .-.
+ | | Goat and MarkDeep
+ '-'
+
+ +-+
+ + + MarkDeep only
+ +-+
+
+ +-+
+ | | MarkDeep only
+ +-+
+
+
+Parallel arcs
+
+ _..---.
+ __)) )- MarkDeep only
+ ''---'
diff --git a/examples/large-nodes.svg b/examples/large-nodes.svg
index 7b7c174..592c524 100644
--- a/examples/large-nodes.svg
+++ b/examples/large-nodes.svg
@@ -5,6 +5,7 @@ svg {
}
@media (prefers-color-scheme: dark) {
svg {
+ color-scheme: dark; /* ask the browser for a dark background */
color: #FFFFFF;
}
}
diff --git a/examples/line-decorations.svg b/examples/line-decorations.svg
index 8275285..3172ecb 100644
--- a/examples/line-decorations.svg
+++ b/examples/line-decorations.svg
@@ -5,6 +5,7 @@ svg {
}
@media (prefers-color-scheme: dark) {
svg {
+ color-scheme: dark; /* ask the browser for a dark background */
color: #FFFFFF;
}
}
diff --git a/examples/line-ends.svg b/examples/line-ends.svg
index 5552eb6..85dd638 100644
--- a/examples/line-ends.svg
+++ b/examples/line-ends.svg
@@ -5,6 +5,7 @@ svg {
}
@media (prefers-color-scheme: dark) {
svg {
+ color-scheme: dark; /* ask the browser for a dark background */
color: #FFFFFF;
}
}
diff --git a/examples/overlaps.svg b/examples/overlaps.svg
index c28f1aa..2db48fc 100644
--- a/examples/overlaps.svg
+++ b/examples/overlaps.svg
@@ -5,6 +5,7 @@ svg {
}
@media (prefers-color-scheme: dark) {
svg {
+ color-scheme: dark; /* ask the browser for a dark background */
color: #FFFFFF;
}
}
diff --git a/examples/radius16circle.svg b/examples/radius16circle.svg
new file mode 100644
index 0000000..1996512
--- /dev/null
+++ b/examples/radius16circle.svg
@@ -0,0 +1,33 @@
+
diff --git a/examples/radius16circle.txt b/examples/radius16circle.txt
new file mode 100644
index 0000000..99747b9
--- /dev/null
+++ b/examples/radius16circle.txt
@@ -0,0 +1,9 @@
+ -+
+ +
+
+ +
+ -+
+
+ +-+
+ + +
+ +-+
diff --git a/examples/regression.svg b/examples/regression.svg
index 5d26ed7..f729e42 100644
--- a/examples/regression.svg
+++ b/examples/regression.svg
@@ -5,6 +5,7 @@ svg {
}
@media (prefers-color-scheme: dark) {
svg {
+ color-scheme: dark; /* ask the browser for a dark background */
color: #FFFFFF;
}
}
diff --git a/examples/small-grids.svg b/examples/small-grids.svg
index d652a14..ceb2e73 100644
--- a/examples/small-grids.svg
+++ b/examples/small-grids.svg
@@ -1,10 +1,11 @@
-