The parser seems to be converting strings to logical values, for example 'and' is getting converted to '&&', and 'or' to '||'. It seems to be linked to the way html elements are nested. The text is being used in a tag.
Here is some html that breaks it:
`
Intuitive Features Wrapped Up In a Smart Interface
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Whether you're publishing lots or publishing little we have a plan that's great value and can scale up/down as your needs do, and you're free to cancel anytime.
I am not able to reproduce the problem when compiling the following template with the latest version of marko (v2.3.2):
<layout-use template="./layout.marko">
<layout-put into="foo">
<div class="c c2 span-8-collapse">
<div class="c-inner">
<dl class="summary-list">
<dt>
<h3>Intuitive Features Wrapped Up In a Smart Interface</h3>
</dt>
<dd>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<span class="blue">▸ </span><a href="/features">Explore the Features</a>
</dd>
<dt>
<h3>Pay-as-you-go + Monthly Plans Available</h3>
</dt>
<dd>
<p>Whether you're publishing lots or publishing little we have a plan that's great value and can scale up/down as your needs do, and you're free to cancel anytime.</p>
<span class="blue">▸ </span><a href="/pricing">Choose a plan that's right for you</a>
</dd>
<dt>
<h3 class="green">Start Now - No Obligation 14 Day Free Trial</h3>
</dt>
<dd>
<p>We don't expect you to make a decision before you've kicked the tyres and shown your boss so we offer a no obligation 14 day free trial to everyone.</p>
<span class="green">▸ </span><a href="/features#analytics" class="green">Bored of reading and want to try it for yourself? Start your free trial now</a>
</dd>
</dl>
</div>
</div>
</layout-put>
</layout-use>
@patbegg The view-engine modules were an attempt to normalize the APIs for rendering templates across multiple template engines and to ensure that all templates are loaded as CommonJS modules, but it never really got any traction. We'll fix bugs (and update dependencies when requested), but if you are just using Marko then I would suggest dropping the usage of the view-engine modules and just use marko directly for loading and rendering templates (no middleman and less overhead). While not officially deprecated, I personally don't think it is worthwhile to continue investing in or using the view-engine modules. If you still want to use view-engine then please let me know and if you find issues please open the issue against the appropriate Git repo.
In the mean time I will look into doing a new release for the view-engine-marko module. Thanks.
The parser seems to be converting strings to logical values, for example 'and' is getting converted to '&&', and 'or' to '||'. It seems to be linked to the way html elements are nested. The text is being used in a tag.
Here is some html that breaks it: `
Intuitive Features Wrapped Up In a Smart Interface
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
▸ Explore the FeaturesPay-as-you-go + Monthly Plans Available
Whether you're publishing lots or publishing little we have a plan that's great value and can scale up/down as your needs do, and you're free to cancel anytime.
▸ Choose a plan that's right for youStart Now - No Obligation 14 Day Free Trial
We don't expect you to make a decision before you've kicked the tyres and shown your boss so we offer a no obligation 14 day free trial to everyone.
▸ Bored of reading and want to try it for yourself? Start your free trial now@patbegg Can you confirm what version of marko you have installed? This looks to be the same bug that was previously fixed: https://github.com/raptorjs/marko/issues/60
I am not able to reproduce the problem when compiling the following template with the latest version of marko (
v2.3.2
):I'm using the 'view-engine' and 'view-engine-marko' modules. I think the dependencies are well out of date. Is this still supported: https://github.com/patrick-steele-idem/view-engine-marko.git?
@patbegg The view-engine modules were an attempt to normalize the APIs for rendering templates across multiple template engines and to ensure that all templates are loaded as CommonJS modules, but it never really got any traction. We'll fix bugs (and update dependencies when requested), but if you are just using Marko then I would suggest dropping the usage of the
view-engine
modules and just usemarko
directly for loading and rendering templates (no middleman and less overhead). While not officially deprecated, I personally don't think it is worthwhile to continue investing in or using theview-engine
modules. If you still want to useview-engine
then please let me know and if you find issues please open the issue against the appropriate Git repo.In the mean time I will look into doing a new release for the view-engine-marko module. Thanks.
Update: A new major version of
view-engine-marko
was published that tracksmarko@^2
:view-engine-marko@2.0.0
To upgrade to the latest version:
I'm closing the issue for now. Please let me know if you still see issues and we can reopen if needed.