Skip to content
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

Proposal: to add grammar support for Poetry #524

Closed
endymion1818 opened this issue Sep 26, 2023 · 1 comment
Closed

Proposal: to add grammar support for Poetry #524

endymion1818 opened this issue Sep 26, 2023 · 1 comment

Comments

@endymion1818
Copy link

This one is a bit of a left field but hear me out.

I write articles about code. I also love writing about poetry. But it's very challenging to format poetry in the way that the author might intend it on the web. For examples, look particularly at https://deliciousreverie.co.uk/posts/poems-about-time/#keats---ode-on-a-grecian-urn (where I use shiki's plaintext grammar) and also the comment here: https://hokku.wordpress.com/

Here is one of the unfortunate results (by the way, my editing software steadfastly refuses to put all the verses in these books into the line arrangements the authors used,

The trouble with poetry is that it's not uniform. I cannot just add a rule to add a bit of margin to the start of every paragraph, because it won't work for each poem.

My pet peeve is poetry that breaks lines where authors didn't intend there to be one, which is why I decided to use Shiki in the first place; so that I can have overflow scroll right and left, as well as indentation as the author intended at the start of each line.

In fact, there are many reasons to use Shiki for poetry, not just for code.

What's your opinion, maintainers? I'm happy to write a PR myself if you give the go-ahead.

@antfu
Copy link
Member

antfu commented Jan 26, 2024

Hey, thanks for your contribution! With the recent rewrite of v1.0, we have moved the grammars out of this repository. We generally suggest you loading the grammar locally to move forward. If you believe this is the language that is widely used, you can send an issue or PR to this repo: https://github.com/shikijs/textmate-grammars-themes

Thank you!

@antfu antfu closed this as completed Jan 26, 2024
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

No branches or pull requests

2 participants