Skip to content

lua - use pandoc APIs for codepage handling#12806

Merged
cscheid merged 2 commits intomainfrom
enhance/pandoc-text-encode
May 22, 2025
Merged

lua - use pandoc APIs for codepage handling#12806
cscheid merged 2 commits intomainfrom
enhance/pandoc-text-encode

Conversation

@cscheid
Copy link
Copy Markdown
Member

@cscheid cscheid commented May 22, 2025

Since version 3.0, Pandoc has had the ability to do codepage conversions, so we don't need to use the pure-Lua hacks we currently have.

@posit-snyk-bot
Copy link
Copy Markdown
Collaborator

posit-snyk-bot commented May 22, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@cscheid cscheid merged commit 7e98950 into main May 22, 2025
6 checks passed
@cscheid cscheid deleted the enhance/pandoc-text-encode branch May 22, 2025 19:48
return leaf
end
assert((CS1 - CS2) % width == offset)
if pandoc.system.os == "windows" then
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong
See https://pandoc.org/lua-filters.html#pandoc.system.os

The operating system on which the program is running. (string) The most common values are darwin (macOS), freebsd, linux, linux-android, mingw32 (Windows), netbsd, openbsd.

Windows is mingw32

❯ pandoc lua
Lua 5.4.7  Copyright (C) 1994-2024 Lua.org, PUC-Rio
Embedded in pandoc 3.7.0.1  Copyright (C) 2006-2024 John MacFarlane
> pandoc.system.os                                                                                                                                                        
mingw32

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tarleb Just for your future reference :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants