int start = template.getBeginIndex();
int end = template.getEndIndex();
Style attr = doc.getStyle(ConfigurationValueStyle.TEMPLATE_NORMAL.getName());
attr = (Style) attr.copyAttributes();
attr.addAttribute(ATTRIBUTE_PAGE, link);
attr.addAttribute(ATTRIBUTE_PAGE_ELEMENT, template);
attr.addAttribute(ATTRIBUTE_TEMPLATE_MATCHER, matcher);
attr.addAttribute(ATTRIBUTE_UUID, UUID.randomUUID());
doc.setCharacterAttributes(start, end - start, attr, true);
if (start < thirdStartPosition) {
thirdStartPosition = start;