diff options
| author | Joseph C. Sible <josephcsible@users.noreply.github.com> | 2020-02-14 01:52:51 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-13 22:52:51 -0800 |
| commit | 652ed0b82cd7095f418859356d7e5f8ada65eb49 (patch) | |
| tree | be5df575ea426a839230933a7ac9b3ab7a99c05d /src/Text/Pandoc/Readers/HTML.hs | |
| parent | 29c2670da2a267094148f3edacaed5fc258bcdd1 (diff) | |
A bit more cleanup (#6141)
* Remove unnecessary fmaps and only do toMilliseconds once
* Share the input tuple intead of making a new one
* Lift return out of if
* Simplify case statements
* Lift DottedNum out of the case statements
* Use st instead of mbs
* Use setState instead of updateState now that we have the whole state around
Diffstat (limited to 'src/Text/Pandoc/Readers/HTML.hs')
| -rw-r--r-- | src/Text/Pandoc/Readers/HTML.hs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Readers/HTML.hs b/src/Text/Pandoc/Readers/HTML.hs index 057ff1d31..a32e0b829 100644 --- a/src/Text/Pandoc/Readers/HTML.hs +++ b/src/Text/Pandoc/Readers/HTML.hs @@ -839,11 +839,10 @@ toStringAttr = map go where go (x,y) = case T.stripPrefix "data-" x of - Nothing -> (x,y) - Just x' -> if x' `Set.member` (html5Attributes <> - html4Attributes <> rdfaAttributes) - then (x,y) - else (x',y) + Just x' | x' `Set.notMember` (html5Attributes <> + html4Attributes <> rdfaAttributes) + -> (x',y) + _ -> (x,y) pScriptMath :: PandocMonad m => TagParser m Inlines pScriptMath = try $ do |
