From bab4bb38178372fde49c76ec8b4c4ae288bbd64c Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 7 Sep 2025 11:48:14 -0400 Subject: [PATCH] examples: Fixed HTML output with multi-paragraph READMEs. --- build-scripts/build-web-examples.pl | 6 ++++++ examples/template.html | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/build-scripts/build-web-examples.pl b/build-scripts/build-web-examples.pl index c255ea3a91..74802e9b5a 100755 --- a/build-scripts/build-web-examples.pl +++ b/build-scripts/build-web-examples.pl @@ -187,6 +187,11 @@ sub handle_example_dir { $description =~ s/\s+\Z//; } + my $short_description = "$description"; + $short_description =~ s/\\n.*//gms; + $short_description =~ s/\A\s+//; + $short_description =~ s/\s+\Z//; + do_mkdir($dst); do_copy($jssrc, $jsdst); do_copy($wasmsrc, $wasmdst); @@ -238,6 +243,7 @@ sub handle_example_dir { s/\@example_name\@/$example/g; s/\@javascript_file\@/$jsfname/g; s/\@htmlified_source_code\@/$htmlified_source_code/g; + s/\@short_description\@/$short_description/g; s/\@description\@/$description/g; s/\@preview_image\@/$preview_image/g; s/\@other_examples_html\@/$other_examples_html/g; diff --git a/examples/template.html b/examples/template.html index 3e43946438..5af99c2c7a 100644 --- a/examples/template.html +++ b/examples/template.html @@ -9,7 +9,7 @@ - +