pub fn split_templates(
templates: Vec<Template>,
max_size: usize,
) -> Vec<Template>Expand description
Splits a list of templates into smaller templates if they are too large.
Warning: There are a few assumptions made in this function:
- The function depth of individual blocks do not matter.
- Global scope is not overly used (i.e. if statements should be a few blocks maximum).
- Non-function templates cannot be split.