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

Content isn't separated properly. #52

Open
bausshf opened this issue Apr 6, 2018 · 3 comments
Open

Content isn't separated properly. #52

bausshf opened this issue Apr 6, 2018 · 3 comments

Comments

@bausshf
Copy link

bausshf commented Apr 6, 2018

As it can be seen on the vibe.d website's about page it's split like:

		p With vibe.d we are trying to bring the highest performance possible together with a
			| programming interface that is as clean as possible. At the same time the choice of

But still it's written as "aprogramming" instead of "a programming"

See the screenshot for representation in the browser.

vibed

@schveiguy
Copy link
Contributor

Not sure if this is the same issue, but I am having issues where diet-ng inexplicably puts 2 elements that are on separate lines together without spacing directives.

e.g.:

button.btn.btn-primary Button 1
button.btn.btn-secondary Button 2

results in:

<button class="btn btn-primary">Button 1</button><button class="btn btn-primary">Button 2</button>

Button 1 and button 2 appear touching, but if they were separated by a newline, they would have had a slight space between them. I've had to put a span between them to make sure they get separated. I know there are spacing directives to make sure all space is removed, but that doesn't help when all the space has been removed!

@Soldering-Stan
Copy link

Soldering-Stan commented Oct 2, 2022

This is still happening in October 2022 :-( I was going to raise a new issue but this may serve to bump it up the queue :-

// linebreaks.dt
doctype html
html
head
title Demonstration of line breaks

    body

            h1 Example page - showing line breaks

            p This para runs onto the h1

            p Two lines that run into each other without a
                    | trailing space at the end of the first line.

            p Two lines that do NOT run into each other because there
                    |is trailing space at the end of the first line.

            p< This is three lines without trailing spaces at
                    | the end of line one or line two
                    | or line three and
                    | finishing on line 4

It renders to messy HTML. Adding a trailing space to the line or indenting using two spaces does add a space between the words. Note also that the first para comes out appended to the <h1> element and the comments don't have a trailing space before the closing comment mark :-

-->.

<!-- linebreaks.dt--><!DOCTYPE html>
<html>
       <head>
               <title>Demonstration of line breaks</title>
       </head>
       <body>
               <h1>Example page - showing line breaks</h1><p>This para runs onto the h1</p>
               <p>
                       Two lines that run into each other without atrailing space at the end of the first line.
               </p>
               <p>```

                       Two lines that do NOT run into each other because there is trailing space at the end of the first line.
               </p>
               <p>This is three lines without trailing spaces atthe end of line one or line two
                       or line three and
                       finishing on line 4
               </p>
       </body>
</html>

@denis-sh
Copy link

denis-sh commented Oct 3, 2023

October 2023, 5 years - no fix.

Even Text nodes documentation example renders incorrectly:

p This is a long
	| paragraph that is
	| split across multiple
	| lines.

Renders as This is a longparagraph ...

Also note this bug causes a regresion in vibe.d.

Workoaround via downgrading vibe.d

If someone (like me) is still interested in using vibe.d with Diet templates, the only way to use it (without this bug) right now is to use this project specification in dub.sdl:

// Compiler needed for vibe.d version below
toolchainRequirements frontend="~>2.071.2"
// The latest vibe.d version without diet-ng buggy Diet templates
dependency "vibe-d" version="==0.7.29"
// Also specify OpenSSL version to prevent its upgrade causing errors
dependency "openssl" version="==1.1.6+1.0.1g"

Note: If you use Windows, dmd v2.071.2 installation doesn't include dub, so you can download e.g. dub v1.9.0

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

No branches or pull requests

4 participants