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

lorem*2 only give one line of lorem #52345

Closed
IronGhost63 opened this issue Jun 19, 2018 · 11 comments
Closed

lorem*2 only give one line of lorem #52345

IronGhost63 opened this issue Jun 19, 2018 · 11 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug emmet Emmet related issues insiders-released Patch has been released in VS Code Insiders upstream Issue identified as 'upstream' component related (exists outside of VS Code) verified Verification succeeded
Milestone

Comments

@IronGhost63
Copy link

IronGhost63 commented Jun 19, 2018

  • VSCode Version: 1.24.1
  • OS Version: macOS 10.13.5

Steps to Reproduce:

  1. Create/Open an HTML file
  2. type lorem*2 (also happen with lorem<number>*2) then tab

Result is expected to be 2 lines of lorem. but instead there is just one line with <number>*2 words.

Works fine with lorem*3

untitled

Does this issue occur when all extensions are disabled?: Yes

@Cirieno
Copy link

Cirieno commented Jun 19, 2018

I can recreate this.

lorem*n is fine, but lorem*2 gives one long, unbroken line. In each test I have noted an element of punctuation, no break, and then the next word:

hic voluptate!Ab, velit
sint aperiam.Sequi animi
accusamus excepturi?Ad veritatis

VSCode 1.24.1// Windows 10 x64

@vscodebot vscodebot bot removed the new release label Jun 20, 2018
@chrmarti chrmarti added the emmet Emmet related issues label Jun 20, 2018
@ramya-rao-a ramya-rao-a added the bug Issue identified by VS Code Team member as probable bug label Jun 21, 2018
@ramya-rao-a ramya-rao-a added this to the Backlog milestone Jun 21, 2018
@ramya-rao-a ramya-rao-a added the help wanted Issues identified as good community contribution opportunities label Jun 21, 2018
@ramya-rao-a
Copy link
Contributor

PRs are welcome to fix this bug.

The fix would be to the the upstream module called vscode-emmet-helper. There is a test case there for the case of lorem*3 which passes. As observed in this issue, changing that to 2 fails the test case.

@ramya-rao-a ramya-rao-a added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Jun 21, 2018
@TheDancingCode
Copy link

One way around this is setting this in your vscode user settings:

"emmet.syntaxProfiles": {
    "html":{
        "inline_break": 1
    }
}

dyong0 pushed a commit to dyong0/vscode-emmet-helper that referenced this issue Jul 6, 2018
Fix microsoft/vscode#52345

There's a logic determining if a node should have be formatted. It uses
inlineBreak, which is the option inline_break with default value of 3.
In short, an emmet*2 couldn't generate 2 lines since the number of lines
was less than 3.
@dyong0
Copy link

dyong0 commented Jul 6, 2018

@TheDancingCode Thanks, that gave me a hint to fix this issue!
microsoft/vscode-emmet-helper#26

@dyong0
Copy link

dyong0 commented Jul 9, 2018

@ramya-rao-a, could you please review microsoft/vscode-emmet-helper#26?

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Jul 9, 2018

Thanks for figuring that out @TheDancingCode!

@dyong0 I wouldnt change the default for inline_break to 2 as it changes expectations for how inline elements are expanded.
For example, span*2 is expected to expand to <span></span><span></span> where as span*3 is expected to expand to

<span></span>
<span></span>
<span></span>

@sergeche

When trying out lorem in https://docs.emmet.io/, I noticed that lorem*n always surrounded the text by a div tag when n > 1

But the new emmet modules dont do this and so end up becoming an inline element and forced to follow the inline_break configuration.

How do you suggest we tackle this?

@TheDancingCode
Copy link

Surrounding lorem*n with div tags for n > 1 makes sense. Lorem Ipsum is meant to serve as dummy text or data in html elements, so I don't see any use for lorem*n except a quick way to create more elements containing text. If you simply want a longer text, that's what loremN is for. If you want more paragraphs, there's p*n>lorem.

@ramya-rao-a
Copy link
Contributor

I've logged emmetio/expand-abbreviation#23 as an upstream issue with emmet and marking this issue as out of scope.

Once there is a solution from upstream, we can use the same in VS Code

@ramya-rao-a ramya-rao-a added *out-of-scope Posted issue is not in scope of VS Code and removed help wanted Issues identified as good community contribution opportunities labels Sep 11, 2018
@vscodebot
Copy link

vscodebot bot commented Sep 11, 2018

This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.

If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

Thanks for your understanding and happy coding!

@vscodebot vscodebot bot closed this as completed Sep 11, 2018
@rzhao271 rzhao271 assigned rzhao271 and unassigned ramya-rao-a Dec 31, 2020
@rzhao271 rzhao271 removed the *out-of-scope Posted issue is not in scope of VS Code label Dec 31, 2020
@rzhao271 rzhao271 modified the milestones: Backlog, January 2021 Dec 31, 2020
@rzhao271 rzhao271 reopened this Dec 31, 2020
@rzhao271
Copy link
Contributor

rzhao271 commented Jan 6, 2021

\closedWith dc5a3da

@rzhao271
Copy link
Contributor

rzhao271 commented Jan 6, 2021

Verifier: Ensure that running Emmet: Expand Abbreviation on lorem*2 in an HTML file expands to give two lines of lorem ipsum instead of just one.

@meganrogge meganrogge added the verified Verification succeeded label Jan 26, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Feb 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug emmet Emmet related issues insiders-released Patch has been released in VS Code Insiders upstream Issue identified as 'upstream' component related (exists outside of VS Code) verified Verification succeeded
Projects
None yet
9 participants