diff --git a/script/configs/temp_exclude_excerpt.yaml b/script/configs/temp_exclude_excerpt.yaml
index 2dd229b184cf..3d39abc136bb 100644
--- a/script/configs/temp_exclude_excerpt.yaml
+++ b/script/configs/temp_exclude_excerpt.yaml
@@ -7,6 +7,5 @@
# https://github.com/flutter/flutter/issues/102679
- espresso
- in_app_purchase/in_app_purchase
-- mustache_template
- pointer_interceptor
- quick_actions/quick_actions
diff --git a/third_party/packages/mustache_template/CHANGELOG.md b/third_party/packages/mustache_template/CHANGELOG.md
index 634e9abae3cd..7980772e932d 100644
--- a/third_party/packages/mustache_template/CHANGELOG.md
+++ b/third_party/packages/mustache_template/CHANGELOG.md
@@ -1,5 +1,11 @@
## 2.0.4
+* Adds an `example/` app with runnable usage samples.
+* Updates README examples to use excerpt-managed snippets.
+* Adds unit tests for README code excerpts under `example/test/`.
+* Moves excerpt sources to `example/lib/readme_excerpts.dart`.
+* Fixes the simple lambda README example to use `{{ foo }}` instead of an
+ invalid unclosed section tag.
* Fixes a broken README link to the Mustache manual.
## 2.0.3
diff --git a/third_party/packages/mustache_template/README.md b/third_party/packages/mustache_template/README.md
index cf4dab61e4e6..e536ac7c1b50 100644
--- a/third_party/packages/mustache_template/README.md
+++ b/third_party/packages/mustache_template/README.md
@@ -2,7 +2,7 @@
A Dart library to parse and render [mustache templates](https://mustache.github.io/).
-See the [mustache manual](https://mustache.github.io/mustache.5.html) for detailed usage information.
+See the [mustache manual](http://mustache.github.com/mustache.5.html) for detailed usage information.
This library passes all [mustache specification](https://github.com/mustache/spec/tree/master/specs) tests.
@@ -46,11 +46,24 @@ By default all output from `{{variable}}` tags is html escaped, this behaviour c
* During rendering, if no map key or object member which matches the tag name is found, then a TemplateException will be thrown.
+```dart
+try {
+ Template('{{missing}}').renderString({});
+} on TemplateException catch (e) {
+ // Strict mode (default): missing keys throw when rendering.
+}
+```
+
### Lenient mode
* Tag names may use any characters.
* During rendering, if no map key or object member which matches the tag name is found, then silently ignore and output nothing.
+```dart
+final t = Template('{{missing}}', lenient: true);
+final String output = t.renderString({}); // ''
+```
+
## Nested paths
```dart
diff --git a/third_party/packages/mustache_template/example/lib/readme_excerpts.dart b/third_party/packages/mustache_template/example/lib/readme_excerpts.dart
new file mode 100644
index 000000000000..cb40410aa94f
--- /dev/null
+++ b/third_party/packages/mustache_template/example/lib/readme_excerpts.dart
@@ -0,0 +1,121 @@
+// This file hosts README code excerpts (see README.md) and is imported by the
+// example runner and excerpt tests.
+
+// ignore_for_file: public_member_api_docs
+
+import 'package:mustache_template/mustache_template.dart';
+
+String basicRenderExample() {
+ // #docregion BasicRender
+ var source = '''
+{{# names }}
+
{{ lastname }}, {{ firstname }}
+{{/ names }}
+{{^ names }}
+No names.
+{{/ names }}
+{{! I am a comment. }}
+''';
+
+ var template = Template(source, name: 'names-template');
+ var output = template.renderString({
+ 'names':