thpatch / thcrap

Touhou Community Reliant Automatic Patcher
https://www.thpatch.net
The Unlicense
551 stars 41 forks source link

th175: support ruby in pl and nut files #181

Closed brliron closed 2 years ago

brliron commented 2 years ago

Have thcrap automatically convert from the MediaWiki ruby syntax {{ruby|bottom|top}} to the th175 syntax \R[bottom|tom]. Needed for nut files here: https://www.thpatch.net/w/index.php?title=Translations:Th175/Nut_strings/data_script_scene_story_select_nut_25/en&action=edit&loadgroup=page-Th175%2FNut+strings&loadtask=view , and it will be needed for pl files when we implement stage titles (#180, with 「魔法の森の\\R[湿地|シメジ]」 for example).

We already have such a conversion in the th135 pl parser: https://github.com/thpatch/thcrap/blob/a876efa68dab40bfc327d6f59b798d4b100d79b9/thcrap_tasofro/src/pl.cpp#L207. I could be a good idea to move that code from there to a common part (or, with how small it is, we could just copy it).

brliron commented 2 years ago

Fixed in a0bbf753e056baf689fd16b1ff27affd0008c4db