Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when converting from textile to other formats, percentage period percentage is not converted correctly #9878

Closed
dbojan opened this issue Jun 13, 2024 · 2 comments · Fixed by #10470
Labels

Comments

@dbojan
Copy link

dbojan commented Jun 13, 2024

Explain the problem.

When converting from textile markup to other formats, 'percentage period percentage' is not converted correctly

text file named test.textile, containing text:

15%.
15%. 70%

15% %

gets converted to html:

<p>15%.<br />
15. 70</p>
<p>15% %</p>
</body>
</html>

second line is missing % signs

correct conversion would be:

<p>15%.<br />
15%. 70%</p>
<p>15% %</p>
</body>
</html>

if percentage period percentage (15%. 70%) is in the document it does not convert correctly, like it does on the https://textile-lang.com/

command line: pandoc.exe test.textile -s -o test.html

Pandoc version?
windows, pandoc.exe 3.2

@dbojan dbojan added the bug label Jun 13, 2024
@jgm
Copy link
Owner

jgm commented Jun 18, 2024

Thanks for the report. Fix is on the way.

@jgm jgm closed this as completed in 34aeb28 Jun 18, 2024
@dbojan
Copy link
Author

dbojan commented Nov 25, 2024

Hello. This still does not convert properly to html in pandoc 3.5

textile source:

15%.
15%. 70%

15% %

html output:

<p>15%.<br />
15. 70</p>
<p>15% %</p>

also some other examples:

textile source:

63 %. -ok
63% ). 75 % -ok
63%) . In. - ok
63%). % -not ok
63%). 75 %  -not ok

html output:

<p>63 %. -ok</p>
<p>63% ). 75 % -ok</p>
<p>63%) . In. - ok</p>
<p>63). -not ok</p>
<p>63). 75 -not ok</p>

edit: removed a line from second example. Apparently it gets confused with textile span tag:
The <span> tag is created by percent % signs between whitespaces. It is used to group inline-elements in a document.

@jgm jgm reopened this Dec 18, 2024
jgm added a commit that referenced this issue Dec 18, 2024
The span needs to be separated from its surroundings by spaces.
Also, a span can have attributes, which we now attach.

Closes #9878.
jgm added a commit that referenced this issue Dec 18, 2024
The span needs to be separated from its surroundings by spaces.
Also, a span can have attributes, which we now attach.

Closes #9878.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants