package com.hubspot.jinjava.doc;

import java.util.Map;
import java.util.TreeMap;

public class JinjavaDoc {
  private final Map<String, JinjavaDocExpTest> expTests = new TreeMap<>();
  private final Map<String, JinjavaDocFilter> filters = new TreeMap<>();
  private final Map<String, JinjavaDocFunction> functions = new TreeMap<>();
  private final Map<String, JinjavaDocTag> tags = new TreeMap<>();
  private final Map<String, String> snippets = new TreeMap<>();

  public Map<String, JinjavaDocExpTest> getExpTests() {
    return expTests;
  }

  public void addExpTest(JinjavaDocExpTest expTest) {
    expTests.put(expTest.getName(), expTest);
  }

  public Map<String, JinjavaDocFilter> getFilters() {
    return filters;
  }

  public void addFilter(JinjavaDocFilter filter) {
    filters.put(filter.getName(), filter);
  }

  public Map<String, JinjavaDocFunction> getFunctions() {
    return functions;
  }

  public void addFunction(JinjavaDocFunction function) {
    functions.put(function.getName(), function);
  }

  public Map<String, JinjavaDocTag> getTags() {
    return tags;
  }

  public void addTag(JinjavaDocTag tag) {
    tags.put(tag.getName(), tag);
  }

  public Map<String, String> getSnippets() {
    return snippets;
  }

  public void addSnippet(String name, String snippet) {
    snippets.put(name, snippet);
  }
}

@@ -430,17 +430,21 @@
 String%3E 
-s
+codeS
 nippets 
@@ -1207,16 +1207,20 @@
 ing%3E get
+Code
 Snippets
@@ -1235,17 +1235,21 @@
  return 
-s
+codeS
 nippets;
@@ -1271,16 +1271,20 @@
 void add
+Code
 Snippet(
@@ -1318,17 +1318,21 @@
 ) %7B%0A    
-s
+codeS
 nippets.

change snippets to codeSnippets so it would be unique in output