ir: Honor documentation_length in Cython.
This commit is contained in:
@@ -43,9 +43,14 @@ impl Source for Documentation {
|
||||
return;
|
||||
}
|
||||
|
||||
let end = match config.documentation_length {
|
||||
DocumentationLength::Short => 1,
|
||||
DocumentationLength::Full => self.doc_comment.len(),
|
||||
};
|
||||
|
||||
// Cython uses Python-style comments, so `documentation_style` is not relevant.
|
||||
if config.language == Language::Cython {
|
||||
for line in &self.doc_comment {
|
||||
for line in &self.doc_comment[..end] {
|
||||
write!(out, "#{}", line);
|
||||
out.new_line();
|
||||
}
|
||||
@@ -76,11 +81,6 @@ impl Source for Documentation {
|
||||
_ => (),
|
||||
}
|
||||
|
||||
let end = match config.documentation_length {
|
||||
DocumentationLength::Short => 1,
|
||||
DocumentationLength::Full => self.doc_comment.len(),
|
||||
};
|
||||
|
||||
for line in &self.doc_comment[..end] {
|
||||
match style {
|
||||
DocumentationStyle::C => out.write(""),
|
||||
|
||||
@@ -7,14 +7,7 @@ cdef extern from *:
|
||||
cdef extern from *:
|
||||
|
||||
# The root of all evil.
|
||||
#
|
||||
# But at least it contains some more documentation as someone would expect
|
||||
# from a simple test case like this. Though, this shouldn't appear in the
|
||||
# output.
|
||||
void root();
|
||||
|
||||
# A little above the root, and a lot more visible, with a run-on sentence
|
||||
# to test going over the first line.
|
||||
#
|
||||
# Still not here, though.
|
||||
void trunk();
|
||||
|
||||
Reference in New Issue
Block a user