@@ -0,0 +1,1485 @@
+package com.github.onsdigital.babbage.template.handlebars.helpers.markdown.util;%0A%0Aimport com.github.onsdigital.babbage.template.TemplateService;%0A%0Aimport java.io.IOException;%0Aimport java.util.LinkedHashMap;%0Aimport java.util.UUID;%0Aimport java.util.regex.Matcher;%0Aimport java.util.regex.Pattern;%0A%0Apublic class PulloutBoxTagReplacer extends TagReplacementStrategy %7B%0A%0A    private static final Pattern pattern = Pattern.compile(%22%3Cons-box align=%5C%22(%5Ba-zA-Z%5D*)%5C%22%3E(.*?)%3C/ons-box%3E%22);%0A    private final String template;%0A%0A    /**%0A     * Create an instance of a tag replacement strategy with the given page path.%0A     * %3Cp%3E%0A     * The page path is the path of the page having tags replaced. It is used to resolve links that are relative to the page.%0A     *%0A     * @param path%0A     */%0A    public PulloutBoxTagReplacer(String path, String template) %7B%0A        super(path);%0A        this.template = template;%0A    %7D%0A%0A    @Override%0A    Pattern getPattern() %7B%0A        return pattern;%0A    %7D%0A%0A    @Override%0A    String replace(Matcher matcher) throws IOException %7B%0A%0A        String alignment = matcher.group(1);%0A        String content = matcher.group(2);%0A        LinkedHashMap%3CString, Object%3E additionalData = new LinkedHashMap%3C%3E();%0A        additionalData.put(%22id%22, UUID.randomUUID().toString().substring(10));%0A        additionalData.put(%22content%22, content);%0A        additionalData.put(%22alignment%22, alignment);%0A        return TemplateService.getInstance().renderTemplate(template, null, additionalData);%0A    %7D%0A%7D

Add handler for <ons-box> tags in markdown