question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multiline attributes fail

See original GitHub issue

For example, this gives a “malformed attribute block” error:

%img(src="images/foo.png"
     title="Some Image")

However, it works fine in Ruby Haml.

This also needs to be supported for curly-braced attribute blocks; Ruby Haml supports those being multiline as well, though it strictly enforces that each line but the last must end with a comma.

Issue Analytics

  • State:open
  • Created 11 years ago
  • Reactions:2
  • Comments:13

github_iconTop GitHub Comments

1reaction
mebiboucommented, Feb 9, 2018

Ah wait, for those like me wanting to use webpack and having this error, you can use ruby-haml-loader which uses the actual haml gem, so you won’t have any errors at all if it works already in your Ruby app!

1reaction
Sinethetacommented, Jun 14, 2017

@AnalyzePlatypus I came back to take a look, but on inspection I’d call this unfixable. haml-js is parsing documents using regexes. The core of tag matching is done by https://github.com/creationix/haml-js/blob/master/lib/haml.js#L184 which assumes that each tag exists on a single line.

Although it might be possible to match based on tag delimeters ., #, or % I’m not willing to dive into a library that translates without a parser myself. Sorry, I’d suggest not using haml with js projects 😞

Read more comments on GitHub >

github_iconTop Results From Across the Web

I Cannot Attribute My Multiple Lines to Attributes
When creating your Attribute you will see on the upper left side of the Dialog Box an option called Multiple-lines. This option will...
Read more >
AutoCAD Tip: Multiline Attributes: When One Line Just Isn't ...
Several releases ago, AutoCAD added the ability to create an attribute definition with multiple lines of text. Join Lynn Allen as she shows ......
Read more >
AutoCAD Tip -- Multiline Attributes: When One Line Just Isn't ...
Several releases ago, AutoCAD added the ability to create an attribute definition with multiple lines of text. Join Lynn Allen as she shows ......
Read more >
Width factor of multiline attribute - AutoCAD Forum
Solved: I was trying to find out, how to change the width factor of multiline attribute and I failed. The only way was...
Read more >
AutoCAD 2008: MATTs (Multiline Attributes) - Between the Lines
Click Draw menu > Block > Define Attributes.... · In the Attribute Definition dialog box, under Mode, select Multiple Lines. · Enter tag ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found