Normalize fullwidth punctuation to ASCII across codebase.

Add scripts/normalize_ambiguous_unicode.py; fix corrupted patch_instance_theme_templates.py. Preserves curly quotes in string literals; removes Git homoglyph warnings on .env.example.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-08 23:42:26 +08:00
parent aaa72c7961
commit b733e551a0
392 changed files with 71522 additions and 71369 deletions
+32 -32
View File
@@ -1,32 +1,32 @@
{# 方向 / 币种env 账户级限制三所共用宏);调用方须 with context #}
{% if trade_policy is not defined %}
{% set trade_policy = {'symbol_restrict_enabled': false, 'direction_restrict_enabled': false, 'symbol_whitelist': [], 'allows_long': true, 'allows_short': true, 'direction_mode': 'both', 'badge_text': ''} %}
{% endif %}
{% macro trade_policy_symbol(name, id, value='', required=true, placeholder='BTC 或 BTC/USDT') -%}
{% if trade_policy.symbol_restrict_enabled and trade_policy.symbol_whitelist %}
<select name="{{ name }}" id="{{ id }}" {% if required %}required{% endif %} class="trade-policy-symbol-select">
<option value="">选择币种</option>
{% for sym in trade_policy.symbol_whitelist %}
<option value="{{ sym }}" {% if value and (value|upper == sym or value|upper.startswith(sym ~ '/')) %}selected{% endif %}>{{ sym }}/USDT</option>
{% endfor %}
</select>
{% else %}
<input id="{{ id }}" name="{{ name }}" placeholder="{{ placeholder }}" {% if required %}required{% endif %} value="{{ value }}">
{% endif %}
{%- endmacro %}
{% macro trade_policy_direction(name, id, required=true, include_empty=true) -%}
{% if trade_policy.direction_restrict_enabled and trade_policy.direction_mode == 'long_only' %}
<span class="trade-policy-dir-lock" title="账户配置仅做多">做多</span>
<input type="hidden" name="{{ name }}" id="{{ id }}" value="long">
{% elif trade_policy.direction_restrict_enabled and trade_policy.direction_mode == 'short_only' %}
<span class="trade-policy-dir-lock" title="账户配置仅做空">做空</span>
<input type="hidden" name="{{ name }}" id="{{ id }}" value="short">
{% else %}
<select name="{{ name }}" id="{{ id }}" {% if required %}required{% endif %}>
{% if include_empty %}<option value="">方向</option>{% endif %}
{% if trade_policy.allows_long %}<option value="long">做多</option>{% endif %}
{% if trade_policy.allows_short %}<option value="short">做空</option>{% endif %}
</select>
{% endif %}
{%- endmacro %}
{# 方向 / 币种:env 账户级限制(三所共用宏);调用方须 with context #}
{% if trade_policy is not defined %}
{% set trade_policy = {'symbol_restrict_enabled': false, 'direction_restrict_enabled': false, 'symbol_whitelist': [], 'allows_long': true, 'allows_short': true, 'direction_mode': 'both', 'badge_text': ''} %}
{% endif %}
{% macro trade_policy_symbol(name, id, value='', required=true, placeholder='BTC 或 BTC/USDT') -%}
{% if trade_policy.symbol_restrict_enabled and trade_policy.symbol_whitelist %}
<select name="{{ name }}" id="{{ id }}" {% if required %}required{% endif %} class="trade-policy-symbol-select">
<option value="">选择币种</option>
{% for sym in trade_policy.symbol_whitelist %}
<option value="{{ sym }}" {% if value and (value|upper == sym or value|upper.startswith(sym ~ '/')) %}selected{% endif %}>{{ sym }}/USDT</option>
{% endfor %}
</select>
{% else %}
<input id="{{ id }}" name="{{ name }}" placeholder="{{ placeholder }}" {% if required %}required{% endif %} value="{{ value }}">
{% endif %}
{%- endmacro %}
{% macro trade_policy_direction(name, id, required=true, include_empty=true) -%}
{% if trade_policy.direction_restrict_enabled and trade_policy.direction_mode == 'long_only' %}
<span class="trade-policy-dir-lock" title="账户配置:仅做多">做多</span>
<input type="hidden" name="{{ name }}" id="{{ id }}" value="long">
{% elif trade_policy.direction_restrict_enabled and trade_policy.direction_mode == 'short_only' %}
<span class="trade-policy-dir-lock" title="账户配置:仅做空">做空</span>
<input type="hidden" name="{{ name }}" id="{{ id }}" value="short">
{% else %}
<select name="{{ name }}" id="{{ id }}" {% if required %}required{% endif %}>
{% if include_empty %}<option value="">方向</option>{% endif %}
{% if trade_policy.allows_long %}<option value="long">做多</option>{% endif %}
{% if trade_policy.allows_short %}<option value="short">做空</option>{% endif %}
</select>
{% endif %}
{%- endmacro %}