-
-
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
rST writer: add option for list tables, closes #4564 #4780
Conversation
This changes the public-facing API, and these changes should be carefully described. As a result of the API change, this PR would require at least a bump to 2.3. |
This is a non-breaking change, so according to the versioning policy it must affect only C in A.B.C, if i understand correctly. When you say carefully described you mean a line for the changelog and the release notes, or a paragraph somewhere in the manual? |
Note that, differently from what is discussed in #4564, list tables are not the default option, here. I figured it's better to introduce it as a new option for now, it will be easy to change the default behaviour later if we will want to |
Francesco Occhipinti <[email protected]>
writes:
This is a non-breaking change, so according to the [versioning policy](https://pvp.haskell.org/) it must affect only C in A.B.C, if i understand correctly.
That's correct.
When you say _carefully described_ you mean a line for the changelog and the release notes, or a paragraph somewhere in the manual?
The commit message should precisely describe the API
change and signal that it's an API change. That way I
can put this in the changelog when it's time to do a
release. The API isn't described in the manual, so
no changes are needed there.
|
this changes the API adding a global `--list-table` option which only affects the rST writer, and causes all tables to be rendered using the list table syntax documented here http://docutils.sourceforge.net/docs/ref/rst/directives.html#list-table
i edited the commit message and force-pushed. while writing it occurred to me that, being an option that only involves one format, maybe it could be exposed as an extension in order not to pollute the space of global options. it could be used with |
hi @kaushalmodi, the simple table syntax alternative doesn't seem to add much value in terms of maintainability in comparison with other styles, at least in my opinion. Anyway i will submit the idea to my team and check whether is there any interest, thanks |
@danse As the original issue mentions, it adds value to my use case of converting Org mode documentation to RST format, which the Nim language doc generator requires (and the RST parser in Nim accepts only simple table syntax). Thanks for considering this request. Update: Also, may be continue the conversation about simple tables in #4750 so that this thread doesn't get off-topic. |
I like the idea of making this an extension. The main
difficult I see is that, in this case, we'd want the
extension to have different defaults for reading and
writing, and that isn't currently possible. That is,
the default should be to properly detect list tables
when reading RST, but I don't think the default should
be to emit list tables when writing RST. Perhaps it
could be documented that the extension only affects
the writer (and only RST and maybe muse). That would
be a bit unusual, but we may already have other
extensions like that.
Francesco Occhipinti <[email protected]>
writes:
… i edited the commit message and force-pushed. while writing it occurred to me that, being an option that only involves one format, maybe it could be exposed as an extension in order not to pollute the space of global options. it could be used with `-t rst+list-tables`. i cannot assess the possibility of list tables to be adopted for other markup languages
|
so if i understand correctly, extensions are expected to affect reading and writing. is there a place where we keep a glossary? it would be great for refining these concepts. about list tables, if they are one of the allowed syntaxes, then we want them to pass through the parser anyway. i guess that this principle applies to all readers |
Is this a functional solution yet? Can I get a version of Pandoc that generates list tables instead of grid tables when converting to RST? |
I would love to see list-table write support in pandoc. Need it for a Norwegian national standard. Any hope to have support for it in an official pandoc version any time soon? |
@danse another happy pandoc user here 👍 |
Superseeded by a corresponding updated pull request |
I moved some code from the body of
blockToRST
to agridTableRST
function which exposes the same interface aslistTable
.I wrote
mapTable
andjoinTable
thinking that they could end up to theShared
module some day. They are straightforward but i think that using them makes the code more readable.I also fixed the help string for the
reference-links
option.