We should add a separate test file for the code that lives in our SDK guides, or discuss other methods of testing code snippets.
cc @friedbunny
See @ericrwolfe鈥檚 https://github.com/mapbox/mapbox-gl-native/pull/8354#issuecomment-287492022 for more information about other examples testing that鈥檚 already happening.
We might be able to rework the original script from this PR #7337 to scan through the guides directory and replace placeholder tokens in the markdown files.
The original script from #7337 looks suitable for this purpose. It can be much simpler than the one we use to insert example code into the headers, because the guide鈥檚 .md.ejs can mark the insertion point with an HTML comment that the developer never sees. By contrast, anything we put in the headers is visible to the developer, so that script needed a bit of Swift syntax awareness to figure out the insertion point for itself.
@jmkiley I'm moving this to the 3.6.0 milestone since it does not seem critical for a patch release. Please feel free to put it back if it looks like it'll be completed soon!