diff --git a/app/src/main/java/net/gsantner/markor/frontend/textview/TextViewUtils.java b/app/src/main/java/net/gsantner/markor/frontend/textview/TextViewUtils.java index 6fb0b97ad0..e8793065dc 100644 --- a/app/src/main/java/net/gsantner/markor/frontend/textview/TextViewUtils.java +++ b/app/src/main/java/net/gsantner/markor/frontend/textview/TextViewUtils.java @@ -37,6 +37,7 @@ import java.util.List; import java.util.Locale; import java.util.TreeSet; +import java.util.UUID; @SuppressWarnings({"CharsetObjectCanBeUsed", "WeakerAccess", "unused"}) public final class TextViewUtils extends GsTextUtils { @@ -424,6 +425,10 @@ public static String interpolateSnippet(String text, final String title, final S .replace("{{sel}}", selectedText) .replace("{{cursor}}", HighlightingEditor.PLACE_CURSOR_HERE_TOKEN); + while (text.contains("{{uuid}}")) { + text = text.replaceFirst("\\{\\{uuid\\}\\}", UUID.randomUUID().toString()); + } + return interpolateEscapedDateTime(text); }