Open dawidreedsy opened 2 years ago
@jkr can you see what is going on here?
@dawidreedsy before we bother @jkr to look at this, could you try with pandoc 2.18, the latest version? I noticed that you're using an ancient version of pandoc.
@jgm Yeah sure, give me few minutes. FYI I took the version from the pandoc json
"pandoc-api-version": [
1,
22,
1
],
but when i do pandoc --version
i got
pandoc 2.17.1.1
Compiled with pandoc-types 1.22.1, texmath 0.12.4, skylighting 0.12.2,
citeproc 0.6.0.1, ipynb 0.2
@jgm Used the latest version:
pandoc 2.18
Compiled with pandoc-types 1.22.2, texmath 0.12.5, skylighting 0.12.3,
citeproc 0.7, ipynb 0.2, hslua 2.2.0
Scripting engine: Lua 5.4
and have the same result
I think a part of the issue here is that the comment-end
spans are nested within one another.
If I manually rearrange the JSON so that they're serial (not nested), like the comment-start
, then I get the correct output:
{
"pandoc-api-version": [
1,
22,
2
],
"meta": {},
"blocks": [
{
"t": "Para",
"c": [
{
"t": "Span",
"c": [
[
"",
[
"comment-start"
],
[
[
"id",
"0"
],
[
"author",
"Dawid Kisielewski"
],
[
"date",
"2022-07-18T15:20:46Z"
]
]
],
[
{
"t": "Str",
"c": "Comment"
}
]
]
},
{
"t": "Span",
"c": [
[
"",
[
"comment-start"
],
[
[
"id",
"1"
],
[
"author",
"Dawid Kisielewski"
],
[
"date",
"2022-07-18T15:20:50Z"
]
]
],
[
{
"t": "Str",
"c": "Reply"
}
]
]
},
{
"t": "Str",
"c": "Start"
},
{
"t": "Span",
"c": [
[
"",
[
"comment-end"
],
[
[
"id",
"0"
]
]
],
[]
]
},
{
"t": "Span",
"c": [
[
"",
[
"comment-end"
],
[
[
"id",
"1"
]
]
],
[]
]
}
]
}
]
}
Here's the resulting doc:
@alecgibson It is actaully not a correct output as there should be one comment with reply not two comments.
Explain the problem. I have this
docx
file that contains comment and the response to the comment like this:before.docx Using this command i convert it to pandoc json:
I got this json
As you can see the json look ok it has the comment and the reply but if i convert it back to the docx file. Using this command:
This is the file i got: after.docx
It has only one comment with no reply:
I did a little bit of digging and it seems that the
word/document.xml
inside thedocx
is not converted properly from the pandoc json format. The originaldocument.xml
:The one generated by pandoc:
It seems like the reference to the reply of the comment is missing as in the original file we have this
Pandoc version?
Pandoc version:Pandoc api version:1.22.1
1.22.2
Pandoc version:2.18
Os version:macOs Monterey 12.4 M1 Mac