[Bind] Do not skip parameters in documentation

Multiple parameters may share a single description. The DocProcessor
will now correctly generate DocumentationParameters for each of them.
This commit is contained in:
thefiddler 2014-03-30 19:16:30 +02:00
parent d1b99219ba
commit 61791c91db

View file

@ -100,12 +100,12 @@ namespace Bind
((IEnumerable)doc.XPathEvaluate("/refentry/refnamediv/refpurpose")) ((IEnumerable)doc.XPathEvaluate("/refentry/refnamediv/refpurpose"))
.Cast<XElement>().First().Value), .Cast<XElement>().First().Value),
Parameters = Parameters =
((IEnumerable)doc.XPathEvaluate("/refentry/refsect1[@id='parameters']/variablelist/varlistentry")) ((IEnumerable)doc.XPathEvaluate("/refentry/refsect1[@id='parameters']/variablelist/varlistentry/term/parameter"))
.Cast<XNode>() .Cast<XElement>()
.Select(p => .Select(p =>
new DocumentationParameter( new DocumentationParameter(
p.XPathSelectElement("term/parameter").Value.Trim(), p.Value.Trim(),
Cleanup(p.XPathSelectElement("listitem").Value))) Cleanup(p.XPathSelectElement("../../listitem").Value)))
.ToList() .ToList()
}; };