-
Notifications
You must be signed in to change notification settings - Fork 179
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
Add support for tables and strike-through text in the XSLT #117
Conversation
This is great! @nwellnhof would you have any suggestions for improvements? |
It looks like this won't work with table cells containing multiple lines. Supporting multiple lines probably requires a two-pass approach and the EXSLT |
I'd also suggest to put the templates handling GHF extensions in a separate stylesheet and import the core stylesheet with |
👋 @nwellnhof ! Thanks for your review!
|
Thinking more about it, supporting multiple lines in table cells is anything but trivial. Sorry, but I don't have time to help you there. |
We don't support table cells with multiple lines as it stands, so I think it's a non-issue. @maelle Let me know when this is ready for merge (if you plan on separating out the extensions). |
I've now made it a separate stylesheet. 😸 I didn't know multilines tables weren't supported, one problem less then. I added a small comment inside the stylesheet to explain what it is. Btw I was wondering whether/where the two stylesheets should be documented, i.e. how would someone know they even exist. |
Awesome, thank you!
This is a good point — @jgm, do you have any thoughts/opinions here? Right now |
Ashe Connor <[email protected]> writes:
This is a good point — @jgm, do you have any
thoughts/opinions here? Right now `xml2md.xsl` is
buried in the `tools` directory and no reference to
it is made. I'm not a consumer of this, so I
wouldn't know where I _would_ go looking for
documentation/pointers to such a thing if I was one.
I'm not really sure. It could be put in the README,
I suppose, along with a pointer to the dtd documenting
the XML format.
|
@jgm I'd be happy to open a PR to the commonmark/cmark repo. Maybe a subsection of "Usage" in the README could be "Misc" and mention the stuff in https://github.com/commonmark/cmark/tree/master/tools including the stylesheet.
|
* Add support for tables and strike-through text in the XSLT * Update xml2md.xsl * Add specific stylesheet for tables and strike-through * Add comment
this PR adds support for tables and strike-through text to @nwellnhof's useful XSLT stylesheet.
The tables obtained are not "pretty", i.e. each column header gets three dashes only.
Cc @jeroen