-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[WIP] Add Muse reader #3620
[WIP] Add Muse reader #3620
Conversation
I'd rather not merge until this has support for tables and lists. |
@jgm Ok, will make them high priority then. |
02705ba
to
b9c1740
Compare
Regarding tables: My understanding is that Muse supports tables.el and org tables (plus a third style). The org reader should be able to read tables.el formatted tables as well (#3314). It seems to me that a simple way to do this would be to extract the grid table parser from the markdown reader into a separate module. Same for the org table parser. @jgm, would you be okay with a separate |
Text.Pandoc.Parsing already contains gridTableWith.
Can you just use that?
+++ Albert Krewinkel [May 01 17 07:43 ]:
… Regarding tables: My understanding is that Muse supports tables.el and
org tables. The org reader should be able to read tables.el formatted
tables as well ([1]#3314). It seems to me that a simple way to do this
would be to extract the grid table parser from the markdown reader into
a separate module. Same for the org table parser. ***@***.***, would you be
okay with a separate Table module, collecting all (shared) table
parsers?
—
You are receiving this because you were mentioned.
Reply to this email directly, [3]view it on GitHub, or [4]mute the
thread.
References
1. #3314
2. https://github.com/jgm
3. #3620 (comment)
4. https://github.com/notifications/unsubscribe-auth/AAAL5CnST3L7objsxo91lySubhB2Xos7ks5r1e-mgaJpZM4NMfqW
|
Ah, yes. I had missed that. I generalized the signature of tableWith :: (Stream s m Char, HasReaderOptions st, Monad mf)
=> ParserT s st m (mf [Blocks], [Alignment], [Int])
-> ([Int] -> ParserT s st m (mf [Blocks]))
-> ParserT s st m sep
-> ParserT s st m end
-> ParserT s st m (mf Blocks) i.e. the state is no longer fixed to |
Oh, good. I wonder if your generalization of gridTableWith
would allow it to be used in the Markdown reader?
Currently we don't use it there, mostly because of the
F monad, if I recall.
(But part of the reason is also that in Markdown grid
tables we support alignments now. Actually, it should
be fairly harmless to allow those in the RST reader, since
an actual RST document wouldn't have alignment markings.)
|
I pushed the changes and can take a look into merging the Markdown-specific gridTable parser into the generic parser. |
c29b6be
to
55b6afa
Compare
9d495f7
to
d9ee633
Compare
Added tables support. It is aimed to be compatible with Emacs Muse, not Text::Amuse, as Text::Amuse differences are considered a bug: melmothx/text-amuse#14 For example, tables are not required to be indented with a space, although writer indents them now for compatibility with Text::Amuse #3649. |
673418d
to
006eff1
Compare
8f5c1c5
to
e88b895
Compare
2409c3e
to
a20fc38
Compare
@jgm Tables and lists are now supported. I rebased against master and removed all hlint warnings. No definition lists and Org tables (A Muse Wiki does not support them either, though) yet. |
Great, thanks! |
Text::Amuse does support definition lists https://amusewiki.org/library/manual#toc16 (documented since February 2016). https://amusewiki.org/git/amw/commit/m/ml/manual.muse?id=73579f4c26aa047742cb319f3661a203b2fc7eb7 |
@melmothx "A Muse Wiki does not support them either, though" was related to Org tables only. |
I have created a basic Muse reader. It supports headings, inline markup and footnotes, but no tables and lists. It is far from full markup support, but it satisfies my needs so I plan to continue development slowly from now on. Hope it gets merged.