File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,19 @@ main() {
115115 fi
116116 fi
117117
118- # TODO: run examples found in Markdown files (including CLI examples)
118+ # Run JavaScript examples in README files:
119+ files=$( echo " ${changed_files} " | grep ' README.md$' | grep -v ' ^tools/' | tr ' \n' ' ' )
120+ if [[ -n " ${files} " ]]; then
121+ echo ' Running README JavaScript examples...' >&2
122+ make FILES=" ${files} " markdown-examples-javascript-files > /dev/null >&2
123+ if [[ " $? " -ne 0 ]]; then
124+ echo ' ' >&2
125+ echo ' Encountered an error when running README JavaScript examples.' >&2
126+ on_error 1
127+ fi
128+ fi
129+
130+ # TODO: run CLI examples found in Markdown files
119131
120132 # Run C benchmark files...
121133 files=$( echo " ${changed_files} " | grep ' benchmark/.*\.c$' | tr ' \n' ' ' )
You can’t perform that action at this time.
0 commit comments