From afabccd4d0dad50937b960a237633ce621a06ad5 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 30 Jul 2024 15:37:46 -0400 Subject: [PATCH] examples: Split up description text by line breaks. --- build-scripts/build-web-examples.pl | 7 +++---- examples/game/01-snake/README.txt | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 examples/game/01-snake/README.txt diff --git a/build-scripts/build-web-examples.pl b/build-scripts/build-web-examples.pl index 7b07f999a..c11589e73 100755 --- a/build-scripts/build-web-examples.pl +++ b/build-scripts/build-web-examples.pl @@ -106,12 +106,11 @@ sub handle_example_dir { my $description = ''; if (open(my $readmetxth, '<', "$examples_dir/$category/$example/README.txt")) { - my $spc = ''; while (<$readmetxth>) { chomp; - s/\"/\\"/g; - $description .= "$spc$_"; - $spc = ' '; + s/\A\s+//; + s/\s+\Z//; + $description .= "$_
"; } close($readmetxth); } diff --git a/examples/game/01-snake/README.txt b/examples/game/01-snake/README.txt new file mode 100644 index 000000000..1cf97846a --- /dev/null +++ b/examples/game/01-snake/README.txt @@ -0,0 +1 @@ +A complete game of Snake, written in SDL.