From 705beb10acbd5ec338969ab0609d597fdd45f345 Mon Sep 17 00:00:00 2001 From: towards-a-new-leftypol Date: Wed, 6 Mar 2024 00:04:44 -0500 Subject: [PATCH] Move Parsing.PostPartType to Common --- chandlr.cabal | 2 +- src/Common | 2 +- src/Parsing/BodyParser.hs | 2 +- src/Parsing/PostPartType.hs | 26 -------------------------- 4 files changed, 3 insertions(+), 29 deletions(-) delete mode 100644 src/Parsing/PostPartType.hs diff --git a/chandlr.cabal b/chandlr.cabal index 08832a0..927713e 100644 --- a/chandlr.cabal +++ b/chandlr.cabal @@ -84,7 +84,7 @@ executable chandlr Parsing.BodyParser Parsing.QuoteLinkParser Parsing.EmbedParser - Parsing.PostPartType + Common.Parsing.PostPartType Common.Component.TimeControl Component.Search Common.Component.Search.SearchTypes diff --git a/src/Common b/src/Common index b027379..3abd4f9 160000 --- a/src/Common +++ b/src/Common @@ -1 +1 @@ -Subproject commit b027379d274c8f9b42ae161545bed368b9e800c3 +Subproject commit 3abd4f9f772e864b5e9e1b44a07909bb7d74423b diff --git a/src/Parsing/BodyParser.hs b/src/Parsing/BodyParser.hs index 1648013..bfc1f2b 100644 --- a/src/Parsing/BodyParser.hs +++ b/src/Parsing/BodyParser.hs @@ -32,7 +32,7 @@ import Miso.String (fromMisoString) import qualified Common.Network.PostType as Post import Common.Component.Thread.Model (PostWithBody) -import Parsing.PostPartType +import Common.Parsing.PostPartType import Parsing.QuoteLinkParser diff --git a/src/Parsing/PostPartType.hs b/src/Parsing/PostPartType.hs deleted file mode 100644 index 59654f1..0000000 --- a/src/Parsing/PostPartType.hs +++ /dev/null @@ -1,26 +0,0 @@ -module Parsing.PostPartType where - -import GHCJS.DOM.Types (JSString) -import Text.Parsec (ParseError) - -import Parsing.QuoteLinkParser (ParsedURL) - -data PostPart - = SimpleText JSString - | PostedUrl JSString - | Skip - | Quote (Either ParseError ParsedURL) - -- Quotes don't seem to be able to be spoilered - -- board links (which appear as quotes but start with >>>) break the tag - | GreenText [ PostPart ] - | OrangeText [ PostPart ] - | RedText [ PostPart ] - | Spoiler [ PostPart ] - -- you can't seem to spoiler greentext - | Bold [ PostPart ] - | Underlined [ PostPart ] - | Italics [ PostPart ] - | Strikethrough [ PostPart ] - deriving (Show, Eq) - -