The current behaviour of !code is to filter out any extraneous newlines. However, the most common usage of this command is to post teams and Pokemon sets - which require double newlines to be parsed properly. As it currently is, if I paste a team to another user, it'll be displayed as
Alcremie (F) @ Leftovers
Ability: Aroma Veil
EVs: 252 HP / 252 SpA / 4 SpD Modest Nature
IVs: 0 Atk
- Decorate
- Helping Hand
- Dazzling Gleam
- Psyshock
Swoobat (M) @ Weakness Policy
Ability: Simple
EVs: 252 SpA / 4 SpD / 252 Spe
Timid Nature
IVs: 0 Atk
- Calm Mind
- Stored Power
- Ally Switch
- Air Slash
which requires manual editing to become importable. My suggestion is to permit consecutive newlines in code blocks, or at least permit two to be displayed.
(If this is approved, I'll PR the fix.) */
const params = str.slice(+str.startsWith('\n')).split('\n');
Alcremie (F) @ Leftovers
Ability: Aroma Veil
EVs: 252 HP / 252 SpA / 4 SpD Modest Nature
IVs: 0 Atk
- Decorate
- Helping Hand
- Dazzling Gleam
- Psyshock
Swoobat (M) @ Weakness Policy
Ability: Simple
EVs: 252 SpA / 4 SpD / 252 Spe
Timid Nature
IVs: 0 Atk
- Calm Mind
- Stored Power
- Ally Switch
- Air Slash
which requires manual editing to become importable. My suggestion is to permit consecutive newlines in code blocks, or at least permit two to be displayed.
(If this is approved, I'll PR the fix.) */
const params = str.slice(+str.startsWith('\n')).split('\n');