Leading/Trailing Whitespace
See original GitHub issueI’m trying to make Twitter Bootstrap Dropdown, which requires a space between the bound button label and the .caret class to look right, and I can’t figure out a way to do this in emblem. In slim, I would use either a leading space on the caret or a trailing space on the html ouptut:
.dropdown
a.btn.btn-default.dropdown-toggle href="#" data-toggle="dropdown"
=> timePeriodLabel
span.caret
Here are the respective links to the slim documentation: https://github.com/slim-template/slim#trailing-and-leading-whitespace-- https://github.com/slim-template/slim#output-
The only thing I could find in Emblem was the legacy slim trailing space notation in the “Plain Text” section here: http://emblemjs.com/syntax/
I have tried the following: =>
, =<
, ='
, span.caret>
, span.caret<
Issue Analytics
- State:
- Created 9 years ago
- Comments:6
Top Results From Across the Web
Leading and trailing whitespace - Data auditing and cleaning
There are procedures for deleting trailing whitespace in C, Python, Vim, PHP, Java, Visual Studio, R, C++, JavaScript, etc etc. Nobody wants ...
Read more >c++ - what is meant by trailing space and what's the difference ...
Trailing space is all whitespace located at the end of a line, without any other characters following it. This includes spaces (what you ......
Read more >5.12. Trim Leading and Trailing Whitespace - O'Reilly
To keep things simple and fast, the best all-around solution is to use two substitutions—one to remove leading whitespace, and another to remove...
Read more >Remove Leading/Trailing Whitespace - R
a character string specifying whether to remove both leading and trailing whitespace (default), or only leading ( "left" ) or trailing ( "right"...
Read more >How to Remove Leading and Trailing Spaces in Excel
Leading spaces (at the start of the text), Trailing spaces (at the end of the text) and Non-Breaking spaces (prevents line breaks from...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
+1
Only way I’ve been able to achieve this is like so:
The ’ with a blank line forces a space b/t elements. Gross, but works.
What I meant is a way to add a space after the element when it is actually followed by another element at the same level (and not if it is the last element in the container), reproducing how newlines between elements are rendered as a whitespace in html and plain handlebars. I don’t use slim, but haml does the right thing most of the times, and I rarely had to force whitespace.