Sha256: fb6da02835e4fe8e002859e86929b6c20b6f0f608ced93a2d1fa1d19f8dff42e

Contents?: true

Size: 1.51 KB

Versions: 45

Compression:

Stored size: 1.51 KB

Contents

// default to uppercase
require(__dirname).test
  ( { xml :
      "<span class=\"test\" hello=\"world\"></span>"
    , expect :
      [ [ "attribute", { name: "CLASS", value: "test" } ]
      , [ "attribute", { name: "HELLO", value: "world" } ]
      , [ "opentag", { name: "SPAN",
                       attributes: { CLASS: "test", HELLO: "world" },
                       isSelfClosing: false } ]
      , [ "closetag", "SPAN" ]
      ]
    , strict : false
    , opt : {}
    }
  )

// lowercase option : lowercase tag/attribute names
require(__dirname).test
  ( { xml :
      "<span class=\"test\" hello=\"world\"></span>"
    , expect :
      [ [ "attribute", { name: "class", value: "test" } ]
      , [ "attribute", { name: "hello", value: "world" } ]
      , [ "opentag", { name: "span",
                       attributes: { class: "test", hello: "world" },
                       isSelfClosing: false } ]
      , [ "closetag", "span" ]
      ]
    , strict : false
    , opt : {lowercase:true}
    }
  )

// backward compatibility with old lowercasetags opt
require(__dirname).test
  ( { xml :
      "<span class=\"test\" hello=\"world\"></span>"
    , expect :
      [ [ "attribute", { name: "class", value: "test" } ]
      , [ "attribute", { name: "hello", value: "world" } ]
      , [ "opentag", { name: "span",
                       attributes: { class: "test", hello: "world" },
                       isSelfClosing: false } ]
      , [ "closetag", "span" ]
      ]
    , strict : false
    , opt : {lowercasetags:true}
    }
  )

Version data entries

45 entries across 45 versions & 3 rubygems

Version Path
ela-4.1.6 node_modules/sax/test/case.js
ela-4.1.5 node_modules/sax/test/case.js
ela-4.1.4 node_modules/sax/test/case.js
ela-4.1.3 node_modules/sax/test/case.js
ela-4.1.2 node_modules/sax/test/case.js
ela-4.1.1 node_modules/sax/test/case.js
ela-4.1.0 node_modules/sax/test/case.js
ela-4.0.0 node_modules/sax/test/case.js
ela-3.4.3 node_modules/sax/test/case.js
ela-3.4.2 node_modules/sax/test/case.js
ela-3.4.0 node_modules/sax/test/case.js
ela-3.3.1 node_modules/sax/test/case.js
ela-3.3.0 node_modules/sax/test/case.js
ela-3.2.0 node_modules/sax/test/case.js
ela-3.1.1 node_modules/sax/test/case.js
ela-3.1.0 node_modules/sax/test/case.js
ela-3.0.0 node_modules/sax/test/case.js
ela-2.0.0 node_modules/sax/test/case.js
ela-1.1.0 node_modules/sax/test/case.js
stylus-source-0.54.5 vendor/node_modules/sax/test/case.js