Jean Jourdain's solution will work with some fine point additions.
1. The Strip_YAML.pl and Markdown.pl files have to have their file execute permission set so the piping script can invoke those scripts for execution. Where you have those two scripts isn't critical but for convenience of using them as stand alone BBEdit text filters you can place them in BBEdit's Text Filters folder ~/Library/Application Support/BBEdit/Text Filters/. (Or you can place them in BBEdit's Preview Filters folder if you want the option of using them as separate stand alone Preview filters as well as the combined piped script filter.)
2. The piping script has to be placed in BBEdit's Preview Filters folder, ~/Library/Application Support/BBEdit/Preview Filters/, so the script's file name will be included in the Preview window's "Filter:" pop down menu. Once that script's file name has been selected from the Filter: popup menu subsequent invocations of Markup -> Preview in BBEdit will automatically run that script with the contents of the frontmost window when Markup -> Preview in BBEdit is chosen. You don't necessarily have to have that script's file execute permission set.
3. If you use the file name with a space in it as your script github link shows (i.e., "Strip YAML.pl"), you'll need to use quoting or space escaping so the shell will interpret the file path as a single contiguous string instead of multiple space separated strings.