#821 closed defect (fixed)
bug in docbook export ( code inside list).
Reported by: | José Matos | Owned by: | José Matos |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | docbook export | Version: | unspecified |
Severity: | normal | Keywords: | VERIFIED |
Cc: | totschnig.michael@… |
Description
In the description list
with a nested code environment, the generated docbook has two listitem
closing tags instead of one.
Attachments (3)
Change History (13)
by , 21 years ago
Attachment: | modules.lyx added |
---|
comment:1 by , 21 years ago
is soembody working on this bug? If there is something I can do to help resolve
it...
comment:2 by , 21 years ago
Cc: | added |
---|
comment:3 by , 21 years ago
Jose ?
Michael, if you know C++, finding the exact bit of code that causes
the problem would help
comment:4 by , 21 years ago
unfortunately, I do not know C++, but by looking at function makeDocBookFile in
buffer.C, it seems obvious that the problems is in the following section:
environment tag closing
for (; depth > par->params().depth(); --depth) {
if (environment_inner[depth] != "!-- --") {
item_name = "listitem";
sgml::closeTag(ofs, command_depth + depth, false, item_name);
if (environment_inner[depth] == "varlistentry")
sgml::closeTag(ofs, depth+command_depth, false, environment_inner[depth]);
}
sgml::closeTag(ofs, depth + command_depth, false, environment_stack[depth]);
environment_stack[depth].erase();
environment_inner[depth].erase();
}
if (depth == par->params().depth()
&& environment_stack[depth] != style->latexname()
&& !environment_stack[depth].empty()) {
if (environment_inner[depth] != "!-- --") {
item_name= "listitem";
sgml::closeTag(ofs, command_depth+depth, false, item_name);
if (environment_inner[depth] == "varlistentry")
sgml::closeTag(ofs, depth + command_depth, false, environment_inner[depth]);
}
sgml::closeTag(ofs, depth + command_depth, false, environment_stack[depth]);
environment_stack[depth].erase();
environment_inner[depth].erase();
}
two times in this block you have
if (environment_inner[depth] != "!-- --") {
item_name= "listitem";
sgml::closeTag(ofs, command_depth+depth, false, item_name);
it seems that in certain conditions both of this occurences are executed, thus
leading to two listitem closing tags.
comment:5 by , 21 years ago
Hi,
yes, I have an eye on it but real work got in the way.
For 1.3.x the idea is to chase the bug and squash it.
I will play a bit with it, and expect to have some news soon.
For 1.4 the idea is to rewrote the code in a way similar
to the present latex export.
comment:6 by , 21 years ago
Subject: lyx-devel src/: ChangeLog buffer.C
CVSROOT: /usr/local/lyx/cvsroot
Module name: lyx-devel
Repository: lyx-devel/src/
Changes by: jamatos@… 03/06/06 13:28:13
Modified files:
lyx-devel/src/: ChangeLog buffer.C
Log message:
Fix docbook export (#821)
Bugs:
#821
Patches:
http://www.lyx.org/cgi-bin/viewcvs.cgi/lyx-devel/src/ChangeLog?r1=1.1367&r2=1.1368
http://www.lyx.org/cgi-bin/viewcvs.cgi/lyx-devel/src/buffer.C?r1=1.478&r2=1.479
Complete Diff:
/usr/bin/cvs -f diff -kk -u -r 1.1367 -r 1.1368 src/ChangeLog
/usr/bin/cvs -f diff -kk -u -r 1.478 -r 1.479 src/buffer.C
comment:7 by , 21 years ago
Subject: lyx-devel src/: Tag: BRANCH_1_3_X ChangeLog buff ...
CVSROOT: /usr/local/lyx/cvsroot
Module name: lyx-devel
Repository: lyx-devel/src/
Changes by: jamatos@… 03/06/06 15:04:48
Modified files:
lyx-devel/src/: Tag: BRANCH_1_3_X ChangeLog buffer.C
Log message:
Fix docbook export (#821)
Bugs:
#821
Patches:
http://www.lyx.org/cgi-bin/viewcvs.cgi/lyx-devel/src/ChangeLog?r1=1.1021.2.14&r2=1.1021.2.15
http://www.lyx.org/cgi-bin/viewcvs.cgi/lyx-devel/src/buffer.C?r1=1.399.2.2&r2=1.399.2.3
Complete Diff:
/usr/bin/cvs -f diff -kk -u -r 1.1021.2.14 -r 1.1021.2.15 src/ChangeLog
/usr/bin/cvs -f diff -kk -u -r 1.399.2.2 -r 1.399.2.3 src/buffer.C
comment:8 by , 21 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I commited the fix to both 1.3 and 1.4 trees.
Bug closed unless you have any other cases where this code fails.
testcase for the bug