Repository: buxlabs/boxwood
Pull request #660 (2020-11-16 20:16:31)

Changed doctype directive case


Patch:
diff --git a/src/tags/doctype.js b/src/tags/doctype.js
index fa84a1a..bd5838c 100644
--- a/src/tags/doctype.js
+++ b/src/tags/doctype.js
@@ -4,5 +4,5 @@ const { getLiteral } = require('../utilities/ast')
 const { getTemplateAssignmentExpression } = require('../utilities/factory')
 
 module.exports = function ({ tree, options }) {
-  tree.append(getTemplateAssignmentExpression(options.variables.template, getLiteral('<!doctype html>')))
+  tree.append(getTemplateAssignmentExpression(options.variables.template, getLiteral('<!DOCTYPE html>')))
 }


Test patch:
diff --git a/test/fixtures/acceptance/admin-page/components/layout.html b/test/fixtures/acceptance/admin-page/components/layout.html
index b53e3b5..ba959ef 100644
--- a/test/fixtures/acceptance/admin-page/components/layout.html
+++ b/test/fixtures/acceptance/admin-page/components/layout.html
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <html lang='{language}'>
 <head partial='./head.html' {title}></head>
 <body class="{color || 'snow'} background">
diff --git a/test/fixtures/acceptance/admin-page/expected.html b/test/fixtures/acceptance/admin-page/expected.html
index 1f1ebc6..1b8bdf6 100644
--- a/test/fixtures/acceptance/admin-page/expected.html
+++ b/test/fixtures/acceptance/admin-page/expected.html
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <html lang="en">
 <head>
   <meta charset="utf-8">
diff --git a/test/fixtures/acceptance/app-page/expected.html b/test/fixtures/acceptance/app-page/expected.html
index 7062fe1..3880c15 100644
--- a/test/fixtures/acceptance/app-page/expected.html
+++ b/test/fixtures/acceptance/app-page/expected.html
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <html lang="pl">
 <head>
   <meta charset="utf-8">
diff --git a/test/fixtures/acceptance/app-page/layouts/layout.html b/test/fixtures/acceptance/app-page/layouts/layout.html
index 9f027af..9e06022 100644
--- a/test/fixtures/acceptance/app-page/layouts/layout.html
+++ b/test/fixtures/acceptance/app-page/layouts/layout.html
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <html lang="{language}">
 <head partial="./partials/head.html" {title}></head>
 <link href="./assets/css/main.css" inline>
diff --git a/test/fixtures/acceptance/link-as-component/expected.html b/test/fixtures/acceptance/link-as-component/expected.html
index 992023a..2b2b6b3 100644
--- a/test/fixtures/acceptance/link-as-component/expected.html
+++ b/test/fixtures/acceptance/link-as-component/expected.html
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <html>
   <head>
     <title>lorem ipsum dolor sit amet</title>
diff --git a/test/fixtures/acceptance/link-as-component/layouts/minimal.html b/test/fixtures/acceptance/link-as-component/layouts/minimal.html
index c26d840..fd1924a 100644
--- a/test/fixtures/acceptance/link-as-component/layouts/minimal.html
+++ b/test/fixtures/acceptance/link-as-component/layouts/minimal.html
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <html>
 <head partial="partials/head.html" {title}/>
 <body>
diff --git a/test/fixtures/acceptance/price-calculator/expected.html b/test/fixtures/acceptance/price-calculator/expected.html
index ac0af48..e0fed3f 100644
--- a/test/fixtures/acceptance/price-calculator/expected.html
+++ b/test/fixtures/acceptance/price-calculator/expected.html
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <html>
 <head>
   <title>price calculator</title>
diff --git a/test/fixtures/acceptance/tool-page/components/blank.html b/test/fixtures/acceptance/tool-page/components/blank.html
index 01f8631..5854f07 100644
--- a/test/fixtures/acceptance/tool-page/components/blank.html
+++ b/test/fixtures/acceptance/tool-page/components/blank.html
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <html lang='{language}'>
 <head partial='./head.html'></head>
 <body class="{color || 'purple'} background"><slot></slot></body>
diff --git a/test/fixtures/acceptance/tool-page/expected.html b/test/fixtures/acceptance/tool-page/expected.html
index 3d96763..1c69afb 100644
--- a/test/fixtures/acceptance/tool-page/expected.html
+++ b/test/fixtures/acceptance/tool-page/expected.html
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <html lang="en">
 <head>
   <meta charset="utf-8">
diff --git a/test/fixtures/benchmark/friends/boxwood.html b/test/fixtures/benchmark/friends/boxwood.html
index 314c87d..f8e243b 100644
--- a/test/fixtures/benchmark/friends/boxwood.html
+++ b/test/fixtures/benchmark/friends/boxwood.html
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <html lang="en">
 <head>
   <meta charset="UTF-8">
diff --git a/test/fixtures/benchmark/friends/handlebars.hbs b/test/fixtures/benchmark/friends/handlebars.hbs
index ca074fe..3e71935 100644
--- a/test/fixtures/benchmark/friends/handlebars.hbs
+++ b/test/fixtures/benchmark/friends/handlebars.hbs
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <html lang="en">
 <head>
   <meta charset="UTF-8">
diff --git a/test/fixtures/benchmark/friends/lodash.ejs b/test/fixtures/benchmark/friends/lodash.ejs
index 0657a27..5208d97 100644
--- a/test/fixtures/benchmark/friends/lodash.ejs
+++ b/test/fixtures/benchmark/friends/lodash.ejs
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <html lang="en">
 <head>
   <meta charset="UTF-8">
diff --git a/test/fixtures/benchmark/friends/mustache.mst b/test/fixtures/benchmark/friends/mustache.mst
index 2527472..a3c9b81 100644
--- a/test/fixtures/benchmark/friends/mustache.mst
+++ b/test/fixtures/benchmark/friends/mustache.mst
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <html lang="en">
 <head>
   <meta charset="UTF-8">
diff --git a/test/fixtures/benchmark/friends/underscore.ejs b/test/fixtures/benchmark/friends/underscore.ejs
index 0657a27..5208d97 100644
--- a/test/fixtures/benchmark/friends/underscore.ejs
+++ b/test/fixtures/benchmark/friends/underscore.ejs
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <html lang="en">
 <head>
   <meta charset="UTF-8">
diff --git a/test/fixtures/benchmark/projects/boxwood.html b/test/fixtures/benchmark/projects/boxwood.html
index 43f8916..894a54c 100644
--- a/test/fixtures/benchmark/projects/boxwood.html
+++ b/test/fixtures/benchmark/projects/boxwood.html
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <html>
 <head>
   <title>{title}</title>
diff --git a/test/fixtures/benchmark/projects/handlebars.hbs b/test/fixtures/benchmark/projects/handlebars.hbs
index 1b3f282..989d989 100644
--- a/test/fixtures/benchmark/projects/handlebars.hbs
+++ b/test/fixtures/benchmark/projects/handlebars.hbs
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <html>
 <head>
   <title>{{title}}</title>
diff --git a/test/fixtures/benchmark/projects/lodash.ejs b/test/fixtures/benchmark/projects/lodash.ejs
index 2a725b5..4038e30 100644
--- a/test/fixtures/benchmark/projects/lodash.ejs
+++ b/test/fixtures/benchmark/projects/lodash.ejs
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <html>
 <head>
   <title><%- title %></title>
diff --git a/test/fixtures/benchmark/projects/mustache.mst b/test/fixtures/benchmark/projects/mustache.mst
index 2d8cd6c..1d96802 100644
--- a/test/fixtures/benchmark/projects/mustache.mst
+++ b/test/fixtures/benchmark/projects/mustache.mst
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <html>
 <head>
   <title>{{title}}</title>
diff --git a/test/fixtures/benchmark/projects/underscore.ejs b/test/fixtures/benchmark/projects/underscore.ejs
index 2a725b5..4038e30 100644
--- a/test/fixtures/benchmark/projects/underscore.ejs
+++ b/test/fixtures/benchmark/projects/underscore.ejs
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
 <html>
 <head>
   <title><%- title %></title>
diff --git a/test/spec/basic.spec.js b/test/spec/basic.spec.js
index 707af39..df79d21 100644
--- a/test/spec/basic.spec.js
+++ b/test/spec/basic.spec.js
@@ -14,7 +14,7 @@ test('basic: it ignores comments', async assert => {
 
 test('basic: it handles doctype', async assert => {
   var { template } = await compile('<!DOCTYPE html>')
-  assert.deepEqual(template(), '<!doctype html>')
+  assert.deepEqual(template(), '<!DOCTYPE html>')
 })
 
 test('basic: it handles content', async assert => {
diff --git a/test/spec/features/i18n.spec.js b/test/spec/features/i18n.spec.js
index daa36e1..e09ede3 100644
--- a/test/spec/features/i18n.spec.js
+++ b/test/spec/features/i18n.spec.js
@@ -385,7 +385,7 @@ test('i18n: passing language attribute to the partial', async assert => {
     paths: [path.join(__dirname, '../../fixtures/translations')],
     languages: ['pl', 'en']
   })
-  assert.deepEqual(template({ language: 'pl' }, escape), '<!doctype html><html lang="pl"><body>foo</body></html>')
+  assert.deepEqual(template({ language: 'pl' }, escape), '<!DOCTYPE html><html lang="pl"><body>foo</body></html>')
 })
 
 test('i18n: dynamic scoped translations in conditions', async assert => {