diff --git a/OneMore/Commands/File/Markdown/MarkdownConverter.cs b/OneMore/Commands/File/Markdown/MarkdownConverter.cs index 1c7e953c09..05038b4770 100644 --- a/OneMore/Commands/File/Markdown/MarkdownConverter.cs +++ b/OneMore/Commands/File/Markdown/MarkdownConverter.cs @@ -218,7 +218,7 @@ public MarkdownConverter RewriteTodo(IEnumerable paragraphs) else { // look for all other tags - foreach (var t in Page.taglist) + foreach (var t in MarkdownEmojis.taglist) { // check for other tags if (text.Value.Contains(t.name)) diff --git a/OneMore/Commands/File/Markdown/MarkdownEmojis.cs b/OneMore/Commands/File/Markdown/MarkdownEmojis.cs new file mode 100644 index 0000000000..93f2eff2c3 --- /dev/null +++ b/OneMore/Commands/File/Markdown/MarkdownEmojis.cs @@ -0,0 +1,36 @@ +using System.Collections.Generic; + +namespace River.OneMoreAddIn.Commands +{ + public static class MarkdownEmojis + { + public static List<(string name, string id, string topic, int type)> taglist = new List<(string name, string id, string topic, int type)> + { +// (":todo:", "3", "todo" , 0), + (":question:", "6", "question" , 0), + (":star:", "13", "important", 0 ), + (":exclamation:", "17", "critical", 0), + (":phone:", "18", "phone", 0), + (":bulb:", "21", "idea", 0), + (":house:", "23", "address", 0), + (":three:", "33", "three", 0), + (":zero:", "39", "zero", 0), + (":two:", "51", "two", 0), + (":arrow_right:", "59", "main agenda item", 0), + (":one:", "70", "one", 0), + (":information_desk_person:","94", "discuss person a/b", 21), + (":bellsymbol:", "97", "bellsymbol", 0), + (":busts_in_silhouette:", "116", "busts_in_silhouette", 0), + (":bell:", "117", "bell", 0), + (":letter:", "118", "letter", 0), + (":musical_note:", "121", "musical_note", 0), + (":secret:", "131", "idea", 0), + (":book:", "132", "book", 0), + (":movie_camera:", "133", "movie_camera", 0), + (":zap:", "140", "lightning_bolt", 0), + (":o:", "1", "default", 0) + }; + + + } +} diff --git a/OneMore/Commands/File/Markdown/MarkdownWriter.cs b/OneMore/Commands/File/Markdown/MarkdownWriter.cs index b3273e2c8f..197cded54f 100644 --- a/OneMore/Commands/File/Markdown/MarkdownWriter.cs +++ b/OneMore/Commands/File/Markdown/MarkdownWriter.cs @@ -438,7 +438,7 @@ private string WriteTag(XElement element, bool contained) .Select(e => int.Parse(e.Attribute("symbol").Value)) .FirstOrDefault(); var retValue = ""; - var tagSymbol = Page.taglist.Find(x => x.id == symbol.ToString()); + var tagSymbol = MarkdownEmojis.taglist.Find(x => x.id == symbol.ToString()); switch (symbol) { case 3: // to do diff --git a/OneMore/Commands/File/Markdown/OneMoreDigExtensions.cs b/OneMore/Commands/File/Markdown/OneMoreDigExtensions.cs index ec97b79874..ce83ef85f9 100644 --- a/OneMore/Commands/File/Markdown/OneMoreDigExtensions.cs +++ b/OneMore/Commands/File/Markdown/OneMoreDigExtensions.cs @@ -8,8 +8,6 @@ namespace River.OneMoreAddIn.Commands using Markdig.Extensions.Emoji; using System.Collections.Generic; using System.Linq; - using River.OneMoreAddIn.Helpers.Office; - using System.Web.UI.WebControls; internal static class OneMoreDigExtensions { @@ -21,7 +19,7 @@ public static MarkdownPipelineBuilder UseOneMoreExtensions( var emojiDicNew = new Dictionary(); foreach (var mappings in emojiDic) { - var tagName = Models.Page.taglist.FirstOrDefault(x => x.name.Equals(mappings.Key)).name; + var tagName = MarkdownEmojis.taglist.FirstOrDefault(x => x.name.Equals(mappings.Key)).name; if (tagName.IsNullOrEmpty()) { emojiDicNew.Add(mappings.Key,mappings.Value); diff --git a/OneMore/Models/Page.cs b/OneMore/Models/Page.cs index 5081d1e55b..a44acc6965 100644 --- a/OneMore/Models/Page.cs +++ b/OneMore/Models/Page.cs @@ -121,34 +121,6 @@ public void OptimizeForSave(bool keep) public bool IsValid => Root is not null; - public static List<(string name, string id, string topic, int type)> taglist = new List<(string name, string id, string topic, int type)> - { -// (":todo:", "3", "todo" , 0), - (":question:", "6", "question" , 0), - (":star:", "13", "important", 0 ), - (":exclamation:", "17", "critical", 0), - (":phone:", "18", "phone", 0), - (":bulb:", "21", "idea", 0), - (":house:", "23", "address", 0), - (":three:", "33", "three", 0), - (":zero:", "39", "zero", 0), - (":two:", "51", "two", 0), - (":arrow_right:", "59", "main agenda item", 0), - (":one:", "70", "one", 0), - (":information_desk_person:","94", "discuss person a/b", 21), - (":bellsymbol:", "97", "bellsymbol", 0), - (":busts_in_silhouette:", "116", "busts_in_silhouette", 0), - (":bell:", "117", "bell", 0), - (":letter:", "118", "letter", 0), - (":musical_note:", "121", "musical_note", 0), - (":secret:", "131", "idea", 0), - (":book:", "132", "book", 0), - (":movie_camera:", "133", "movie_camera", 0), - (":zap:", "140", "lightning_bolt", 0), - (":o:", "1", "default", 0) - }; - - /// /// Gets the namespace used to create new elements for the page /// diff --git a/OneMore/OneMore.csproj b/OneMore/OneMore.csproj index e4d923395f..f81bf26f36 100644 --- a/OneMore/OneMore.csproj +++ b/OneMore/OneMore.csproj @@ -147,6 +147,7 @@ +