Revert "Add html5 doctype to static renderer (#486)" (#487)

* Revert "Add html5 doctype to static renderer (#486)"

This reverts commit 3081f5521a which causes failing layout snapshots we've recently turned back on in https://github.com/TokamakUI/Tokamak/pull/484.

* Fix newlines inconsistency
This commit is contained in:
Max Desiatov 2022-05-24 10:59:21 +01:00 committed by GitHub
parent 3081f5521a
commit a604ef5269
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 3 additions and 30 deletions

View File

@ -88,11 +88,11 @@ public final class StaticHTMLRenderer: Renderer {
public func render(shouldSortAttributes: Bool = false) -> String {
"""
<!DOCTYPE html>
<html>
<head>
<title>\(title)</title>
\(meta.map { $0.outerHTML() }.joined(separator: "\n "))
<title>\(title)</title>\(
!meta.isEmpty ? "\n " + meta.map { $0.outerHTML() }.joined(separator: "\n ") : ""
)
<style>
\(tokamakStyles)
</style>

View File

@ -1,8 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<title>Tokamak 2</title>
<style>
._tokamak-stack {
display: grid;

View File

@ -1,8 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<title>Tokamak 2</title>
<style>
._tokamak-stack {
display: grid;

View File

@ -1,8 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
._tokamak-stack {
display: grid;

View File

@ -1,8 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
._tokamak-stack {
display: grid;

View File

@ -1,8 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
._tokamak-stack {
display: grid;

View File

@ -1,8 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
._tokamak-stack {
display: grid;

View File

@ -1,4 +1,3 @@
<!DOCTYPE html>
<html>
<head>
<title></title>

View File

@ -1,4 +1,3 @@
<!DOCTYPE html>
<html>
<head>
<title></title>

View File

@ -1,4 +1,3 @@
<!DOCTYPE html>
<html>
<head>
<title></title>

View File

@ -1,8 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
._tokamak-stack {
display: grid;

View File

@ -1,8 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
._tokamak-stack {
display: grid;

View File

@ -1,8 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
._tokamak-stack {
display: grid;

View File

@ -1,8 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<title>Tokamak 3</title>
<style>
._tokamak-stack {
display: grid;

View File

@ -1,8 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<title>Tokamak</title>
<style>
._tokamak-stack {
display: grid;

View File

@ -1,8 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<title>Tokamak</title>
<style>
._tokamak-stack {
display: grid;