Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[improvement] html 缩进希望能和源文件一致 #80

Open
fanybook opened this issue Feb 17, 2020 · 0 comments
Open

[improvement] html 缩进希望能和源文件一致 #80

fanybook opened this issue Feb 17, 2020 · 0 comments

Comments

@fanybook
Copy link

fanybook commented Feb 17, 2020

有 include 页面时,缩进表现的不好,现在貌似被 gofmt 格式化过,除了缩进还有没用的多余空行

预期的效果,是能尽量保持 .html 的缩进

现在的表现:
userlist.html.go

	for _, user := range userList {
		buffer.WriteString(`
        <ul>
            `)
		buffer.WriteString(`<li>
    `)
		hero.EscapeHTML(user, buffer)
		buffer.WriteString(`
</li>
`)
		buffer.WriteString(`
        </ul>
    `)
	}

Response

        <ul>
            <li>
    Alice
</li>

        </ul>
    
        <ul>
            <li>
    Bob
</li>

        </ul>
    
        <ul>
            <li>
    Tom
</li>

        </ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants