Berrysoft / gal

MIT License
3 stars 0 forks source link

Add `\ruby{}{}` #19

Closed Berrysoft closed 2 years ago

Berrysoft commented 2 years ago

This is useful when authoring config in Japanese.

We need to adjust the structure of a line. The text of an action should not be a String, but Vec<Lines>:

enum Lines{
    Chars(String),
    Block(String),
}

The chars should be printed one by one, while the block should be printed altogether.

This adjustment will also fix the issue with markdown plugin, because it generates HTML tags.

Berrysoft commented 2 years ago

Two Chars in a Vec is the same as one Chars. We can reduce allocations as a bonus.