|
- name: basic
- label: a basic tag with an open and close
- input: "<ref></ref>"
- output: [TagOpenOpen(showtag=True), Text(text="ref"), TagCloseOpen(padding=""), TagOpenClose(), Text(text="ref"), TagCloseClose()]
-
- ---
-
- name: basic_selfclosing
- label: a basic self-closing tag
- input: "<ref/>"
- output: [TagOpenOpen(showtag=True), Text(text="ref"), TagCloseSelfclose(padding="")]
-
- ---
-
- name: content
- label: a tag with some content in the middle
- input: "<ref>this is a reference</ref>"
- output: [TagOpenOpen(showtag=True), Text(text="ref"), TagCloseOpen(padding=""), Text(text="this is a reference"), TagOpenClose(), Text(text="ref"), TagCloseClose()]
-
- ---
-
- name: padded_open
- label: a tag with some padding in the open tag
- input: "<ref ></ref>"
- output: [TagOpenOpen(showtag=True), Text(text="ref"), TagCloseOpen(padding=" "), TagOpenClose(), Text(text="ref"), TagCloseClose()]
-
- ---
-
- name: padded_close
- label: a tag with some padding in the close tag
- input: "<ref></ref >"
- output: [TagOpenOpen(showtag=True), Text(text="ref"), TagCloseOpen(padding=""), TagOpenClose(), Text(text="ref "), TagCloseClose()]
-
- ---
-
- name: padded_selfclosing
- label: a self-closing tag with padding
- input: "<ref />"
- output: [TagOpenOpen(showtag=True), Text(text="ref"), TagCloseSelfclose(padding=" ")]
-
- ---
-
- name: attribute
- label: a tag with a single attribute
- input: "<ref name></ref>"
- output: [TagOpenOpen(showtag=True), Text(text="ref"), TagAttrStart(pad_first=" ", pad_before_eq="", pad_after_eq=""), Text(text="name"), TagCloseOpen(padding=""), TagOpenClose(), Text(text="ref"), TagCloseClose()]
-
- ---
-
- name: attribute_value
- label: a tag with a single attribute with a value
- input: "<ref name=foo></ref>"
- output: [TagOpenOpen(showtag=True), Text(text="ref"), TagAttrStart(pad_first=" ", pad_before_eq="", pad_after_eq=""), Text(text="name"), TagAttrEquals(), Text(text="foo"), TagCloseOpen(padding=""), TagOpenClose(), Text(text="ref"), TagCloseClose()]
-
- ---
-
- name: attribute_quoted
- label: a tag with a single quoted attribute
- input: "<ref name="foo"></ref>"
- output: [TagOpenOpen(showtag=True), Text(text="ref"), TagAttrStart(pad_first=" ", pad_before_eq="", pad_after_eq=""), Text(text="name"), TagAttrEquals(), TagAttrQuote(), Text(text="foo"), TagCloseOpen(padding=""), TagOpenClose(), Text(text="ref"), TagCloseClose()]
-
- ---
-
- name: attribute_hyphen
- label: a tag with a single attribute, containing a hyphen
- input: "<ref name=foo-bar></ref>"
- output: [TagOpenOpen(showtag=True), Text(text="ref"), TagAttrStart(pad_first=" ", pad_before_eq="", pad_after_eq=""), Text(text="name"), TagAttrEquals(), Text(text="foo-bar"), TagCloseOpen(padding=""), TagOpenClose(), Text(text="ref"), TagCloseClose()]
-
- ---
-
- name: attribute_quoted_hyphen
- label: a tag with a single quoted attribute, containing a hyphen
- input: "<ref name="foo-bar"></ref>"
- output: [TagOpenOpen(showtag=True), Text(text="ref"), TagAttrStart(pad_first=" ", pad_before_eq="", pad_after_eq=""), Text(text="name"), TagAttrEquals(), TagAttrQuote(), Text(text="foo-bar"), TagCloseOpen(padding=""), TagOpenClose(), Text(text="ref"), TagCloseClose()]
-
- ---
-
- name: attribute_selfclosing
- label: a self-closing tag with a single attribute
- input: "<ref name/>"
- output: [TagOpenOpen(showtag=True), Text(text="ref"), TagAttrStart(pad_first=" ", pad_before_eq="", pad_after_eq=""), Text(text="name"), TagCloseSelfclose(padding="")]
-
- ---
-
- name: attribute_selfclosing_value
- label: a self-closing tag with a single attribute with a value
- input: "<ref name=foo/>"
- output: [TagOpenOpen(showtag=True), Text(text="ref"), TagAttrStart(pad_first=" ", pad_before_eq="", pad_after_eq=""), Text(text="name"), TagAttrEquals(), Text(text="foo"), TagCloseSelfclose(padding="")]
-
- ---
-
- name: attribute_selfclosing_value_quoted
- label: a self-closing tag with a single quoted attribute
- input: "<ref name="foo"/>"
- output: [TagOpenOpen(showtag=True), Text(text="ref"), TagAttrStart(pad_first=" ", pad_before_eq="", pad_after_eq=""), Text(text="name"), TagAttrEquals(), TagAttrQuote(), Text(text="foo"), TagCloseSelfclose(padding="")]
-
- ---
-
- name: incomplete_lbracket
- label: incomplete tags: just a left bracket
- input: "<"
- output: [Text(text="<")]
-
- ---
-
- name: incomplete_lbracket_junk
- label: incomplete tags: just a left bracket, surrounded by stuff
- input: "foo<bar"
- output: [Text(text="foo<bar")]
-
- ---
-
- name: incomplete_unclosed_open
- label: incomplete tags: an unclosed open tag
- input: "junk <ref"
- output: [Text(text="junk <ref")]
-
- ---
-
- name: incomplete_unclosed_open_space
- label: incomplete tags: an unclosed open tag, space
- input: "junk <ref "
- output: [Text(text="junk <ref ")]
-
- ---
-
- name: incomplete_unclosed_open_unnamed_attr
- label: incomplete tags: an unclosed open tag, unnamed attribute
- input: "junk <ref name"
- output: [Text(text="junk <ref name")]
-
- ---
-
- name: incomplete_unclosed_open_attr_equals
- label: incomplete tags: an unclosed open tag, attribute, equal sign
- input: "junk <ref name="
- output: [Text(text="junk <ref name=")]
-
- ---
-
- name: incomplete_unclosed_open_attr_equals_quoted
- label: incomplete tags: an unclosed open tag, attribute, equal sign, quote
- input: "junk <ref name=""
- output: [Text(text="junk <ref name=\"")]
-
- ---
-
- name: incomplete_unclosed_open_attr
- label: incomplete tags: an unclosed open tag, attribute with a key/value
- input: "junk <ref name=foo"
- output: [Text(text="junk <ref name=foo")]
-
- ---
-
- name: incomplete_unclosed_open_attr_quoted
- label: incomplete tags: an unclosed open tag, attribute with a key/value, quoted
- input: "junk <ref name="foo""
- output: [Text(text="junk <ref name=\"foo\"")]
-
- ---
-
- name: incomplete_open
- label: incomplete tags: an open tag
- input: "junk <ref>"
- output: [Text(text="junk <ref>")]
-
- ---
-
- name: incomplete_open_unnamed_attr
- label: incomplete tags: an open tag, unnamed attribute
- input: "junk <ref name>"
- output: [Text(text="junk <ref name>")]
-
- ---
-
- name: incomplete_open_attr_equals
- label: incomplete tags: an open tag, attribute, equal sign
- input: "junk <ref name=>"
- output: [Text(text="junk <ref name=>")]
-
- ---
-
- name: incomplete_open_attr
- label: incomplete tags: an open tag, attribute with a key/value
- input: "junk <ref name=foo>"
- output: [Text(text="junk <ref name=foo>")]
-
- ---
-
- name: incomplete_open_attr_quoted
- label: incomplete tags: an open tag, attribute with a key/value, quoted
- input: "junk <ref name="foo">"
- output: [Text(text="junk <ref name=\"foo\">")]
-
- ---
-
- name: incomplete_open_text
- label: incomplete tags: an open tag, text
- input: "junk <ref>foo"
- output: [Text(text="junk <ref>foo")]
-
- ---
-
- name: incomplete_open_attr_text
- label: incomplete tags: an open tag, attribute with a key/value, text
- input: "junk <ref name=foo>bar"
- output: [Text(text="junk <ref name=foo>bar")]
-
- ---
-
- name: incomplete_open_text_lbracket
- label: incomplete tags: an open tag, text, left open bracket
- input: "junk <ref>bar<"
- output: [Text(text="junk <ref>bar<")]
-
- ---
-
- name: incomplete_open_text_lbracket_slash
- label: incomplete tags: an open tag, text, left bracket, slash
- input: "junk <ref>bar</"
- output: [Text(text="junk <ref>bar</")]
-
- ---
-
- name: incomplete_open_text_unclosed_close
- label: incomplete tags: an open tag, text, unclosed close
- input: "junk <ref>bar</ref"
- output: [Text(text="junk <ref>bar</ref")]
-
- ---
-
- name: incomplete_open_text_wrong_close
- label: incomplete tags: an open tag, text, wrong close
- input: "junk <ref>bar</span>"
- output: [Text(text="junk <ref>bar</span>")]
-
- ---
-
- name: incomplete_no_tag_name_open
- label: incomplete tags: no tag name within brackets; just an open
- input: "junk <>"
- output: [Text(text="junk <>")]
-
- ---
-
- name: incomplete_no_tag_name_selfclosing
- label: incomplete tags: no tag name within brackets; self-closing
- input: "junk < />"
- output: [Text(text="junk < />")]
-
- ---
-
- name: incomplete_no_tag_name_open_close
- label: incomplete tags: no tag name within brackets; open and close
- input: "junk <></>"
- output: [Text(text="junk <></>")]
|