Link here This is ...">All geek questions in one placeHAML embedded links, but with contentI'm trying to print something along the lines<p>Hello, this is my text. <a href="#">Link here</a> This is more text</p> but using hamlHow to do it? I keep finding examples, but no one shows how to do this, but with clear text on both sides of the link?Neil+6ruby-on-rails views hamlrctneil Jun 06 '12 at 21:12source share2 answersIf you want to make 1 liner: %p= "Hello, this is my text. #{link_to 'Link here', '#'} This is more text".html_safe multi-line %p Hello, this is my text. = link_to 'Link here', '#' This is more text +20Chris barretto Jun 06 '12 at 23:35source shareYou should just do this: %p Hello, this is my text. <a href="#">Link here</a> This is more text This will work too: %p Hello, this is my test. %a{:href => '#'} Link here This is more text +2Dylan markow Jun 06 '12 at 23:07source shareSource: https://habr.com/ru/post/917485/More articles:Objective-C Preprocessor Definition, Dynamic C-String for NSString Declaration - c ++Remove icon RadioButton Icon - androidCalling the callback method in general - javaRefreshing selection after selected option is changed using jQuery - javascriptResque does not collect Redis configuration settings - ruby-on-railsPhonegap does not work in Android emulator - androidCreate an L-shaped border using HTML and CSS, is this possible? - htmlRestart the Node.js application with init.d - node.jsPinch to enlarge the canvas - kineticjshow to interrupt KVM processing - qemuAll Articles
I'm trying to print something along the lines
<p>Hello, this is my text. <a href="#">Link here</a> This is more text</p>
but using haml
How to do it? I keep finding examples, but no one shows how to do this, but with clear text on both sides of the link?
Neil
If you want to make 1 liner:
%p= "Hello, this is my text. #{link_to 'Link here', '#'} This is more text".html_safe
multi-line
%p Hello, this is my text. = link_to 'Link here', '#' This is more text
You should just do this:
%p Hello, this is my text. <a href="#">Link here</a> This is more text
This will work too:
%p Hello, this is my test. %a{:href => '#'} Link here This is more text
Source: https://habr.com/ru/post/917485/More articles:Objective-C Preprocessor Definition, Dynamic C-String for NSString Declaration - c ++Remove icon RadioButton Icon - androidCalling the callback method in general - javaRefreshing selection after selected option is changed using jQuery - javascriptResque does not collect Redis configuration settings - ruby-on-railsPhonegap does not work in Android emulator - androidCreate an L-shaped border using HTML and CSS, is this possible? - htmlRestart the Node.js application with init.d - node.jsPinch to enlarge the canvas - kineticjshow to interrupt KVM processing - qemuAll Articles