proxy icon indicating copy to clipboard operation
proxy copied to clipboard

Add more features to doc code example extractor

Open SidneyCogdill opened this issue 5 months ago • 1 comments

Changes:

  1. Multiple codeblocks within ## Example section is now supported.
  2. Replaced the regular expression based solution with a stateful parser. This makes it capable of handling more complex markdown documentations.
  3. Each doc page now generates a corresponding CMake target in its own subdirectory.
  4. Implemented a template mechanism for CMakeLists.txt generation. The C++ module example makes use of this mechanism to correctly add CXX_MODULES file set.
  5. Only changed files are updated when re-running the generator, by first generating in a temporary directory and then moving only the modified files. This makes incremental builds much faster, since only the actually changed codes (extracted from docs) require recompiling.

Although this is feature complete, I'm marking this as draft, as it's a fairly large change (it almost completely rewrote the old script).

Note this has a few changes since I've wrote it in https://github.com/microsoft/proxy/pull/293.

SidneyCogdill avatar May 19 '25 03:05 SidneyCogdill