-- -- Copyright (C) 2021-2024, AdaCore -- -- SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -- -- Internal representation of a markdown HTML blocks with VSS.Regular_Expressions; with Markdown.Implementation.HTML; package body Markdown.Implementation.HTML_Blocks is Tag_List : constant Wide_Wide_String := "address|" & "article|" & "aside|" & "basefont|" & "base|" & "blockquote|" & "body|" & "caption|" & "center|" & "colgroup|" & "col|" & "dd|" & "details|" & "dialog|" & "dir|" & "div|" & "dl|" & "dt|" & "fieldset|" & "figcaption|" & "figure|" & "footer|" & "form|" & "frameset|" & "frame|" & "h1|" & "h2|" & "h3|" & "h4|" & "h5|" & "h6|" & "header|" & "head|" & "hr|" & "html|" & "iframe|" & "legend|" & "link|" & "li|" & "main|" & "menuitem|" & "menu|" & "nav|" & "noframes|" & "ol|" & "optgroup|" & "option|" & "param|" & "p|" & "section|" & "source|" & "summary|" & "table|" & "tbody|" & "td|" & "tfoot|" & "thead|" & "th|" & "title|" & "track|" & "tr|" & "ul"; Tag_Name : constant Wide_Wide_String := "[a-zA-Z][a-zA-Z0-9\-]*"; Attribute : constant Wide_Wide_String := "[ \t]+" & HTML.Attribute_Name & "(?:" & HTML.Attribute_Value_Spec & ")?"; Open_Tag : constant Wide_Wide_String := "<" & Tag_Name & "(?:" & Attribute & ")*[ \t]*/?>"; Closing_Tag : constant Wide_Wide_String := ""; Open_Prefix : constant Wide_Wide_String := "^(?: | | |)"; -- up to three optional spaces of indentation Case_1 : constant Wide_Wide_String := "<(?:script|pre|style)(?:[ \t\v\f>]|$)"; Case_2 : constant Wide_Wide_String := "", 3 => +"\?>", 4 => +">", 5 => +"\]\]>"]; Blank_Pattern := +"[ \t]*"; end if; end Initialize; end Markdown.Implementation.HTML_Blocks;