mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
docs/parse-support-md: Allow definition lists for features
Now, as well as a `code block', with | Something: some status we tolerate a definition list which in pandoc terms looks like this |Term |: Definition This ought not usually be be used for features but it will be useful for linking to the release notes, because markup is not allowed in code blocks but is in definitions. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Juergen Gross <jgross@suse.com>
This commit is contained in:
1 parent
77e9e7828e
commit
c242a39b14
1 file changed
+27
@@ -191,6 +191,33 @@ sub ri_CodeBlock {
|
||||
}
|
||||
}
|
||||
|
||||
sub ri_DefinitionList {
|
||||
my ($c) = @_;
|
||||
foreach my $defent (@$c) {
|
||||
my ($term, $defns) = @$defent;
|
||||
my $descr =
|
||||
join ' ',
|
||||
map { $_->{c} }
|
||||
grep { $_->{t} eq 'Str' }
|
||||
@$term;
|
||||
push @insections,
|
||||
{
|
||||
Key => descr2key($descr),
|
||||
Headline => $term,
|
||||
};
|
||||
die "multiple definitions in definition list definition"
|
||||
if @$defns > 1;
|
||||
my $defn = $defns->[0];
|
||||
die "multiple paras in definition list definition"
|
||||
if @$defn > 1;
|
||||
my $defnp = $defn->[0];
|
||||
die "only understand plain definition not $defnp->{t} ?"
|
||||
unless $defnp->{t} eq 'Plain';
|
||||
parse_feature_entry $defnp->{c};
|
||||
pop @insections;
|
||||
}
|
||||
}
|
||||
|
||||
sub process_unknown {
|
||||
my ($c, $e) = @_;
|
||||
$had_unknown = Dumper($e);
|
||||
|
||||