MCPcopy Create free account
hub / github.com/andreasfertig/cppinsights / replaceSource

Function replaceSource

docs/OptionDocumentationGenerator.py:40–49  ·  view source on GitHub ↗
(match)

Source from the content-addressed store, hash-verified

38#------------------------------------------------------------------------------
39
40def replaceSource(match):
41 fileName = match.group(2)
42
43 cpp = '<!-- source:%s.cpp -->\n' %(fileName)
44 cpp += '```{.cpp}\n'
45 cpp += open('examples/%s.cpp' %(fileName), 'r').read().strip()
46 cpp += '\n```\n'
47 cpp += '<!-- source-end:%s.cpp -->' %(fileName)
48
49 return cpp
50#------------------------------------------------------------------------------
51
52def cppinsightsLink(code, std='2a', options=''):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected