compiler function
Implementation
dynamic compiler(List regions, String text) {
if (regions.isEmpty) return text;
if (regions[0]['end'] - regions[0]['start'] == text.length - 1) {
return getNumber(regions[0]);
}
return replaceRegionInText(regions, text);
}