Skip to content

Commit

Permalink
[flutter_plugin_tools] Reimplements the excerpt system inline in the …
Browse files Browse the repository at this point in the history
…tool, rather than relying on a separate package. (#4417)

* Allows excerpts to come from any package, not just examples.
* Fixes a bug in the excerpting logic that was causing a stray `}` to appear in one example.
* Removes the need for `build.excerpt.yaml` files.
* Remove the dependency on build_runner for excerpts.
* Reduces the time to generate the excerpts from about 10 minutes to about 5 seconds.
* Almost certainly fixes flutter/flutter#107180 (untested).

The new logic is not quite backwards compatible; the `path-base` feature now specifies a real path to the actual source directories, rather than a path into the invisible generated `excerpts/` directory with its special structure. Also, a number of features from the previous package that were not actually used in this repository are no longer supported (such as having multiple section names per `#docregion` pragma).
  • Loading branch information
Hixie authored Jul 11, 2023
1 parent a10ef35 commit ce29e50
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 22 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?code-excerpt path-base="excerpts/packages/video_player_example"?>
<?code-excerpt path-base="example/lib"?>

# Video Player plugin for Flutter

Expand Down
20 changes: 0 additions & 20 deletions example/build.excerpt.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion test/web_vtt_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ WEBVTT
00:05.200 --> 00:06.000 align:start size:50%
<v Roger Bingham><i>You know I'm so excited my glasses are falling off here.</i>
00:00:06.050 --> 00:00:06.150
00:00:06.050 --> 00:00:06.150
<v Roger Bingham><i>I have a different time!</i>
00:06.200 --> 00:06.900
Expand Down

0 comments on commit ce29e50

Please sign in to comment.