mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Templates: Remove auto wordwrap, fix manual indentation, and reformat docstrings for world options in main. (#1201)
* Fix wrapping too early if docstring is within 120 characters and re-indent other lines. * Remove auto-word wrapping and tweaked all worlds' option docstrings formatting. Options should wrap around the 120 character mark to prevent template files from being too long horizontally. This also allows manual-indentation to work again. * Fix missing '#' on empty lines in output from docstring.
This commit is contained in:
@@ -21,10 +21,10 @@
|
||||
# https://archipelago.gg/check
|
||||
|
||||
# Your name in-game. Spaces will be replaced with underscores and there is a 16-character limit.
|
||||
# {player} will be replaced with the player's slot number.
|
||||
# {PLAYER} will be replaced with the player's slot number, if that slot number is greater than 1.
|
||||
# {number} will be replaced with the counter value of the name.
|
||||
# {NUMBER} will be replaced with the counter value of the name, if the counter value is greater than 1.
|
||||
# {player} will be replaced with the player's slot number.
|
||||
# {PLAYER} will be replaced with the player's slot number, if that slot number is greater than 1.
|
||||
# {number} will be replaced with the counter value of the name.
|
||||
# {NUMBER} will be replaced with the counter value of the name, if the counter value is greater than 1.
|
||||
name: Player{number}
|
||||
|
||||
# Used to describe your yaml. Useful if you have multiple files.
|
||||
@@ -49,12 +49,11 @@ requires:
|
||||
{{ option_key }}:
|
||||
{%- if option.__doc__ %}
|
||||
# {{ option.__doc__
|
||||
| trim
|
||||
| wordwrap(112, wrapstring="\n# ")
|
||||
| replace(' ', '')
|
||||
| replace('\n ', '\n# ')
|
||||
| indent(4, first=False)
|
||||
}}
|
||||
| trim
|
||||
| replace('\n\n', '\n \n')
|
||||
| replace('\n ', '\n# ')
|
||||
| indent(4, first=False)
|
||||
}}
|
||||
{%- endif -%}
|
||||
|
||||
{%- if option.__doc__ and option.range_start is defined %}
|
||||
@@ -82,5 +81,5 @@ requires:
|
||||
{%- else %}
|
||||
{{ yaml_dump(option.default) | trim | indent(4, first=false) }}
|
||||
{%- endif -%}
|
||||
{{ "\n" }}
|
||||
{%- endfor %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user