From bb8478e4e24b431ca81ee7f669d517eb11a47500 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Sat, 6 Jan 2007 09:54:58 +0000 Subject: Merged changes from 'quotes' branch since r431. Smart typography is now handled in the Markdown and LaTeX readers, rather than in the writers. The HTML writer has been rewritten to use the prettyprinting library. git-svn-id: https://pandoc.googlecode.com/svn/trunk@436 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Entities.hs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/Text/Pandoc/Entities.hs') diff --git a/src/Text/Pandoc/Entities.hs b/src/Text/Pandoc/Entities.hs index fd3cf9e57..26785b9a8 100644 --- a/src/Text/Pandoc/Entities.hs +++ b/src/Text/Pandoc/Entities.hs @@ -32,14 +32,19 @@ module Text.Pandoc.Entities ( entityToChar, charToEntity, decodeEntities, - encodeEntities + encodeEntities, + characterEntity ) where import Data.Char ( chr, ord ) -import Text.Regex ( mkRegex, matchRegexAll ) +import Text.Regex ( mkRegex, matchRegexAll, Regex ) import Maybe ( fromMaybe ) --- regexs for entities +-- | Regular expression for decimal coded entity. +decimalCodedEntity :: Text.Regex.Regex decimalCodedEntity = mkRegex "&#([0-9]+);" + +-- | Regular expression for character entity. +characterEntity :: Text.Regex.Regex characterEntity = mkRegex "&#[0-9]+;|&[A-Za-z0-9]+;" -- | Return a string with all entity references decoded to unicode characters -- cgit v1.2.3