Pārlūkot izejas kodu

examples: Split up description text by line breaks.

Ryan C. Gordon 8 mēneši atpakaļ
vecāks
revīzija
afabccd4d0

+ 3 - 4
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 .= "$_<br/>";
         }
         close($readmetxth);
     }

+ 1 - 0
examples/game/01-snake/README.txt

@@ -0,0 +1 @@
+A complete game of Snake, written in SDL.