src/main/java/com/ruleoftech/markdown/page/generator/plugin/MdPageGeneratorMojo.java
private String replaceVariables(String initialContent, Map<String, String> variables) {
        String newContent = initialContent;
        // Only apply substitution if filtering is enabled and there is actually something to
        // substitute, otherwise just return the original content.
        if (applyFiltering && newContent != null) {
            newContent = newContent.replaceAll("\\{\\w*=.*}", "");
            if (variables != null) {
                newContent = substituteVariables(newContent, "\\$\\{(.+?)\\}", variables);
            }
        }

        return newContent;
    }
private String replaceVariables(String initialContent, Map<String, String> variables) {
        String newContent = initialContent;
        // Only apply substitution if filtering is enabled and there is actually something to
        // substitute, otherwise just return the original content.
        if (applyFiltering && newContent != null) {
            newContent = newContent.replaceAll("\\{\\w*=.*}", "");
            if (variables != null) {
                newContent = substituteVariables(newContent, "\\$\\{(.+?)\\}", variables);
            }
        }

        return newContent;
    }
private String replaceVariables ( String initialContent , Map < String , String > variables ) { String newContent = initialContent ; // Only apply substitution if filtering is enabled and there is actually something to // substitute, otherwise just return the original content. if ( applyFiltering && newContent != null ) { newContent = newContent . replaceAll ( "\\{\\w*=.*}" , "" ) ; if ( variables != null ) { newContent = substituteVariables ( newContent , "\\$\\{(.+?)\\}" , variables ) ; } } return newContent ; }
Replace variables in the html file.

@param initialContent html
@param variables      variable map
@return the updated html
Replace variables in the html file .