mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-27 21:31:20 +00:00
Fix doc build
This commit is contained in:
parent
702b6f3788
commit
3620c174a6
@ -30,8 +30,8 @@ if len(args) > 0:
|
|||||||
'git@github.com:fmtlib/fmt.dev.git', site_dir])
|
'git@github.com:fmtlib/fmt.dev.git', site_dir])
|
||||||
if ret != 0:
|
if ret != 0:
|
||||||
sys.exit(ret)
|
sys.exit(ret)
|
||||||
sys.exit(call(['mike', 'deploy', '--config-file', config_path,
|
sys.exit(call(['mike'] + args + ['--config-file', config_path,
|
||||||
'--branch', 'master', 'dev'],
|
'--branch', 'master'],
|
||||||
cwd=site_dir, env=env))
|
cwd=site_dir, env=env))
|
||||||
elif not command.startswith('-'):
|
elif not command.startswith('-'):
|
||||||
args += ['-f', config_path]
|
args += ['-f', config_path]
|
||||||
|
@ -5,7 +5,7 @@ import os
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import xml.etree.ElementTree as et
|
import xml.etree.ElementTree as et
|
||||||
from mkdocstrings.handlers.base import BaseHandler
|
from mkdocstrings.handlers.base import BaseHandler
|
||||||
from typing import Any, Mapping, Optional
|
from typing import Any, List, Mapping, Optional
|
||||||
from subprocess import CalledProcessError, PIPE, Popen, STDOUT
|
from subprocess import CalledProcessError, PIPE, Popen, STDOUT
|
||||||
|
|
||||||
class Definition:
|
class Definition:
|
||||||
@ -39,7 +39,7 @@ tag_text_map = {
|
|||||||
def escape_html(s: str) -> str:
|
def escape_html(s: str) -> str:
|
||||||
return s.replace("<", "<")
|
return s.replace("<", "<")
|
||||||
|
|
||||||
def doxyxml2html(nodes: list[et.Element]):
|
def doxyxml2html(nodes: List[et.Element]):
|
||||||
out = ''
|
out = ''
|
||||||
for n in nodes:
|
for n in nodes:
|
||||||
tag = tag_map.get(n.tag)
|
tag = tag_map.get(n.tag)
|
||||||
@ -56,7 +56,7 @@ def doxyxml2html(nodes: list[et.Element]):
|
|||||||
out += n.tail
|
out += n.tail
|
||||||
return out
|
return out
|
||||||
|
|
||||||
def convert_template_params(node: et.Element) -> Optional[list[Definition]]:
|
def convert_template_params(node: et.Element) -> Optional[List[Definition]]:
|
||||||
templateparamlist = node.find('templateparamlist')
|
templateparamlist = node.find('templateparamlist')
|
||||||
if templateparamlist is None:
|
if templateparamlist is None:
|
||||||
return None
|
return None
|
||||||
@ -68,7 +68,7 @@ def convert_template_params(node: et.Element) -> Optional[list[Definition]]:
|
|||||||
params.append(param)
|
params.append(param)
|
||||||
return params
|
return params
|
||||||
|
|
||||||
def get_description(node: et.Element) -> list[et.Element]:
|
def get_description(node: et.Element) -> List[et.Element]:
|
||||||
return node.findall('briefdescription/para') + \
|
return node.findall('briefdescription/para') + \
|
||||||
node.findall('detaileddescription/para')
|
node.findall('detaileddescription/para')
|
||||||
|
|
||||||
@ -202,7 +202,7 @@ class CxxHandler(BaseHandler):
|
|||||||
root.append(node)
|
root.append(node)
|
||||||
|
|
||||||
def collect_compound(self, identifier: str,
|
def collect_compound(self, identifier: str,
|
||||||
cls: list[et.Element]) -> Definition:
|
cls: List[et.Element]) -> Definition:
|
||||||
'''Collect a compound definition such as a struct.'''
|
'''Collect a compound definition such as a struct.'''
|
||||||
path = os.path.join(self._doxyxml_dir, cls[0].get('refid') + '.xml')
|
path = os.path.join(self._doxyxml_dir, cls[0].get('refid') + '.xml')
|
||||||
with open(path) as f:
|
with open(path) as f:
|
||||||
|
Loading…
Reference in New Issue
Block a user