BUG: `example` scope parse result does not contain newlines
pysan3 opened this issue · 1 comments
pysan3 commented
Hi, thanks a lot for the amazing work.
As I was writing a pandoc json
-> norg
converter, I noticed a bug with example scopes that newlines are not included into c.text
.
Example
@document.meta
title: tmp_example
description:
authors: takuto
categories:
created: 2023-10-30T18:22:27+0900
updated: 2023-10-30T18:22:28+0900
version: 1.1.1
@end
* Example Is Not Parsed Correctly
|example
I am a paragraph segment.
I am another paragraph segment.
Together we form a paragraph.
|end
Result
{
"pandoc-api-version": [
1,
23
],
"meta": {},
"blocks": [
{
"t": "Div",
"c": [
[
"section-h1-example-is-not-parsed-correctly",
[],
[]
],
[
{
"t": "Header",
"c": [
1,
[
"h1-example-is-not-parsed-correctly",
[],
[]
],
[
{
"t": "Str",
"c": "Example"
},
{
"t": "Space"
},
{
"t": "Str",
"c": "Is"
},
{
"t": "Space"
},
{
"t": "Str",
"c": "Not"
},
{
"t": "Space"
},
{
"t": "Str",
"c": "Parsed"
},
{
"t": "Space"
},
{
"t": "Str",
"c": "Correctly"
}
]
]
}
]
]
},
{
"t": "CodeBlock",
"c": [
[
"",
[
"norg"
],
[]
],
" I am a paragraph segment. I am another paragraph segment. Together we form a paragraph."
]
}
]
}
Expected
Newline \n
not being ignored.
...
{
"t": "CodeBlock",
"c": [
[
"",
[
"norg"
],
[]
],
" I am a paragraph segment.\n I am another paragraph segment.\n Together we form a paragraph.\n"
]
}
...
Klafyvel commented
Hi, thank you for reporting the issue.
I am very busy at the moment, but I will welcome a patch if you are
interested in writing one. Otherwise it will have to wait a month or two. :)
Le lun. 30 oct. 2023, 10:32, takuto ***@***.***> a écrit :
… Hi, thanks a lot for the amazing work.
As I was writing a pandoc json -> norg converter, I noticed a bug with
example scopes that newlines are not included into c.text.
Example
@document.meta
title: tmp_example
description:
authors: takuto
categories:
created: 2023-10-30T18:22:27+0900
updated: 2023-10-30T18:22:28+0900
version: 1.1.1
@EnD
* Example Is Not Parsed Correctly
|example
I am a paragraph segment.
I am another paragraph segment.
Together we form a paragraph.
|end
Result
{
"pandoc-api-version": [
1,
23
],
"meta": {},
"blocks": [
{
"t": "Div",
"c": [
[
"section-h1-example-is-not-parsed-correctly",
[],
[]
],
[
{
"t": "Header",
"c": [
1,
[
"h1-example-is-not-parsed-correctly",
[],
[]
],
[
{
"t": "Str",
"c": "Example"
},
{
"t": "Space"
},
{
"t": "Str",
"c": "Is"
},
{
"t": "Space"
},
{
"t": "Str",
"c": "Not"
},
{
"t": "Space"
},
{
"t": "Str",
"c": "Parsed"
},
{
"t": "Space"
},
{
"t": "Str",
"c": "Correctly"
}
]
]
}
]
]
},
{
"t": "CodeBlock",
"c": [
[
"",
[
"norg"
],
[]
],
" I am a paragraph segment. I am another paragraph segment. Together we form a paragraph."
]
}
]
}
Expected
Newline \n not being ignored.
...
{
"t": "CodeBlock",
"c": [
[
"",
[
"norg"
],
[]
],
" I am a paragraph segment.\n I am another paragraph segment.\n Together we form a paragraph.\n"
]
}...
—
Reply to this email directly, view it on GitHub
<#41>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABPL4LYLMA3YXRR5VDC2NJDYB5X2HAVCNFSM6AAAAAA6VWFEX2VHI2DSMVQWIX3LMV43ASLTON2WKOZRHE3DOOJQGY2TONA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>