-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Source in sample code into Markdown docs automatically #54
Comments
mbrukman
added a commit
to mbrukman/cmockery
that referenced
this issue
May 26, 2019
This change add scripts to generate `user_guide.md` automatically from special markers that are now visible in the source file `user_guide.md.in`. This allows us to easily keep the source code up-to-date in the docs without having to manually copy-paste the code, and to ensure that the code we test (in the example files) is exactly the code that ends up in the documentation. Closes google#54
mbrukman
added a commit
to mbrukman/cmockery
that referenced
this issue
May 31, 2019
This change add scripts to generate `user_guide.md` automatically from special markers that are now visible in the source file `user_guide.md.in`. This allows us to easily keep the source code up-to-date in the docs without having to manually copy-paste the code, and to ensure that the code we test (in the example files) is exactly the code that ends up in the documentation. Closes google#54
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now,
README.md
includes copy-pasted code from sample code insrc/example/
tree, but they're not kept in-sync automatically.Ideally, we would have a process for automatically including code samples, e.g., via some preprocessing since it's probably not possible to do it dynamically, so that we can avoid having to see them diverge, e.g., as can be seen in issue #28 and possibly others.
It will also ensure that the code remains valid, as it will be compiled when it's in the
src/example
directory, but we cannot compile or test code while it's in theREADME.md
file.The text was updated successfully, but these errors were encountered: