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

Syntax for ruby (<ruby>) #229

Open
wisim3000 opened this issue May 9, 2023 · 1 comment
Open

Syntax for ruby (<ruby>) #229

wisim3000 opened this issue May 9, 2023 · 1 comment

Comments

@wisim3000
Copy link

wisim3000 commented May 9, 2023

Hi, is it possible to support ruby in djot?

Which is like:

振り仮名ふりがな

Html:

<ruby>振り仮名<rt>ふりがな</rt></ruby>

In Japanese it seems common to display pronunciation with ruby (furigana), especially in light novels.

Also, in Chinese it has some usages on education.

But it should be rare in other languages.

So, should it be considered as a extension?

And I considered something like:

{# 振り仮名 | ふりがな} `

Or:

{#fg 振り仮名 | ふりがな}

`

@bpj
Copy link

bpj commented May 9, 2023

Without speculating on how likely it is that there will be a dedicated syntax for ruby, while there isn't you could use something with classes and then use a filter to convert it into the right HTML; either nested spans

[😁[grin]{.rt}]{.rb}

or a verbatim and parse it with a regex:

`😁|grin`{.rb}

(A regex like ^([^|]+)\|(.+)$)

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