Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data HtmlTag
- = A
- | Abbr
- | Acronym
- | Address
- | Area
- | Article
- | Aside
- | Audio
- | B
- | Base
- | Bdi
- | Bdo
- | Big
- | BlockQuote
- | Body
- | BR
- | Button
- | Canvas
- | Caption
- | Center
- | Cite
- | Code
- | Col
- | ColGroup
- | Data
- | DataList
- | DD
- | Del
- | Details
- | Dfn
- | Dialog
- | Div
- | DL
- | DT
- | Em
- | Embed
- | FieldSet
- | FigCaption
- | Figure
- | Footer
- | Font
- | Form
- | H1
- | H2
- | H3
- | H4
- | H5
- | H6
- | Head
- | Header
- | HR
- | Html
- | I
- | IFrame
- | Img
- | Input
- | Ins
- | Kbd
- | Label
- | Legend
- | LI
- | Link
- | Main
- | Map
- | Mark
- | Meta
- | Meter
- | Nav
- | NoBR
- | NoScript
- | Object
- | OL
- | OptGroup
- | Option
- | Output
- | P
- | Param
- | Picture
- | Pre
- | Progress
- | Q
- | RB
- | RP
- | RT
- | RTC
- | Ruby
- | S
- | Samp
- | Script
- | Select
- | Section
- | Small
- | Source
- | Span
- | Strike
- | Strong
- | Style
- | Sub
- | Summary
- | Sup
- | Table
- | TBody
- | TD
- | Template
- | TFoot
- | TextArea
- | TH
- | THead
- | Time
- | Title
- | TR
- | Track
- | TT
- | U
- | UL
- | Var
- | Video
- | WBR
- | XMP
- data HtmlTagKind
- headingLevel :: HtmlTag -> Maybe Int
- headingTag :: Int -> Maybe HtmlTag
- headingTag' :: Int -> HtmlTag
- htmlTagKind :: HtmlTag -> HtmlTagKind
- htmlTagName :: HtmlTag -> Text
- htmlTagNames :: Map Text HtmlTag
- htmlTags :: Set HtmlTag
Documentation
HTML tags. This enumeration type contains both HTML 5 and 4 tags for maximum compatibility.
data HtmlTagKind Source #
The six kinds of HTML elements.
Instances
Show HtmlTagKind Source # | |
Defined in Text.Seonbi.Html.Tag showsPrec :: Int -> HtmlTagKind -> ShowS # show :: HtmlTagKind -> String # showList :: [HtmlTagKind] -> ShowS # | |
Eq HtmlTagKind Source # | |
Defined in Text.Seonbi.Html.Tag (==) :: HtmlTagKind -> HtmlTagKind -> Bool # (/=) :: HtmlTagKind -> HtmlTagKind -> Bool # | |
Ord HtmlTagKind Source # | |
Defined in Text.Seonbi.Html.Tag compare :: HtmlTagKind -> HtmlTagKind -> Ordering # (<) :: HtmlTagKind -> HtmlTagKind -> Bool # (<=) :: HtmlTagKind -> HtmlTagKind -> Bool # (>) :: HtmlTagKind -> HtmlTagKind -> Bool # (>=) :: HtmlTagKind -> HtmlTagKind -> Bool # max :: HtmlTagKind -> HtmlTagKind -> HtmlTagKind # min :: HtmlTagKind -> HtmlTagKind -> HtmlTagKind # |
headingTag :: Int -> Maybe HtmlTag Source #
Get the heading tag with the given heading level. If the level is
invalid, then Nothing
is returned.
>>>
headingTag 1
Just H1>>>
headingTag 6
Just H6>>>
headingTag 7
Nothing
headingTag' :: Int -> HtmlTag Source #
htmlTagKind :: HtmlTag -> HtmlTagKind Source #
The kind of an HtmlTag
.
>>>
Data.Set.filter ((== EscapableRawText) . htmlTagKind) htmlTags
fromList [TextArea,Title]
htmlTagName :: HtmlTag -> Text Source #
The name of an HtmlTag
in lowercase.
>>>
htmlTagName TextArea
"textarea"
\ t -> htmlTagName t == (toLower $ pack $ show (t :: HtmlTag))