Skip to content

Commit

Permalink
Filter out duplicate unscoped enums
Browse files Browse the repository at this point in the history
  • Loading branch information
SinZ163 committed Oct 1, 2017
1 parent 0ace678 commit 52d2413
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lua_server_enums_docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@ permalink: /lua_server_enums/docs
```lua
{%- for enum_class in site.data.lua_server_enums %}
{% for enum_field in enum_class[1] %}
{%- assign found = nil %}
{%- if enum_class[0] == "_Unscoped" %}
{%- for test_enum_class in site.data.lua_server_enums %}
{%- if test_enum_class[0] == "_Unscoped" %}
{%- continue %}
{%- endif %}
{%- for test_enum_field in test_enum_class[1] %}
{%- if test_enum_field["key"] == enum_field["key"] %}
{%- assign found = true %}
{%- endif %}
{%- endfor %}
{%- endfor %}
{%- endif %}
{%- if found == true %}
{%- continue %}
{%- endif %}
{%- capture enum_key_upper %}{{enum_field["key"] | upcase}}{% endcapture %}
{%- if enum_key_upper == enum_field["key"] %}
{%- if enum_field contains "description" %}
Expand Down

0 comments on commit 52d2413

Please sign in to comment.