-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
east_asian_line_breaks Extension for Org-mode input #3703
Comments
Indeed, this would be simple to add.
We could, with a bit of replumbing, even make the extension work for
all the readers.
|
Here's a python filter that does the same thing (at least I hope), which could serve as a temporary solution. Please correct me if there's any mistake in the code. |
Here's a thought. Currently we do the transformation in the reader, so the AST has no SoftBreak elements between east asian characters. This means that you can't meaningfully do What if we removed the This would operate in the writer, not the reader, and would simply omit softbreak elements (not replacing with space). (This could most conveniently be implemented by adding a filter right before the writer.) I can think of one reason why one might want to keep this feature in the reader: certain constructions are sensitive to spaces (e.g. _ emphasis), and we might want the reader to act as if the line breaks between two east asian characters are not spaces at all. However, the current implementation (which is a filter AFTER parsing) does not do this. If we wanted this, we'd need to integrate the feature more directly in the parsing. |
I made commit 774075c as a first step. |
OK, I now think my thinking above was confused. If you want to use |
New thought 1: we might want to combine the "treat soft breaks between east asian characters as if they were not there" behavior with either New thought 2: or, we could keep I like New thought 2 best, I think. It would be simple to implement and wouldn't require any new options. The only odd thing is that the extension would be applied in Text.Pandoc.App rather than in the reader itself, which would mean it couldn't be used easily when the readers/writers are called as libraries. This might cause some confusion. |
The
east_asian_line_breaks
extension, which eliminatesSoftBreak
between two East Asian wide characters, currently works only for the markdown reader. Org-mode needs the same handling.Here's a simple example
I don't know haskell, but from the code it seems to me that
softBreakFilter
is rather generic and could be adopted by the Org reader.The pandoc version I'm using is
Thank you for making pandoc!
The text was updated successfully, but these errors were encountered: