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

break and continue tags are omitting output before them #123

Closed
IrakliJani opened this issue Apr 27, 2019 · 1 comment
Closed

break and continue tags are omitting output before them #123

IrakliJani opened this issue Apr 27, 2019 · 1 comment

Comments

@IrakliJani
Copy link

break and continue tags are omitting output before them

For example:

{% for i in (1..5) %}
  {% if i == 2 %}
    <div>continue</div>
    {% continue %}
  {% elsif i == 4 %}
    <div>break</div>
    {% break %}
  {% else %}
    <div>{{ i }}</div>
  {% endif %}
{% endfor %}

Expected output:

1
continue
3
break

Actual output:

1
3

https://jsfiddle.net/v47bLp9o/

@harttle harttle added the bug label Apr 27, 2019
@harttle harttle added this to the 9.0.0 milestone Jun 26, 2019
harttle added a commit that referenced this issue Aug 25, 2019
BREAKING CHANGE: remove default export, now should be used like import
{Liquid} from 'liquidjs'
harttle added a commit that referenced this issue Aug 26, 2019
BREAKING CHANGE: remove default export, now should be used like import
{Liquid} from 'liquidjs'
harttle added a commit that referenced this issue Aug 26, 2019
BREAKING CHANGE: remove default export, now should be used like import
{Liquid} from 'liquidjs'
harttle pushed a commit that referenced this issue Aug 26, 2019
# [9.0.0](v8.5.3...v9.0.0) (2019-08-26)

### Bug Fixes

* break/continue omitting output before them, [#123](#123) ([ae45c46](ae45c46))
* reactjs demo during yarn install, fixes [#145](#145) ([b65df44](b65df44))

### Code Refactoring

* return value of Tag#render is no longer used ([8028f82](8028f82))

### Features

* renderSync, parseAndRenderSync and renderFileSync, see [#48](#48) ([7fb01ad](7fb01ad))

### Performance Improvements

* target to es6, fixes [#137](#137) ([3b9fc7e](3b9fc7e))

### BREAKING CHANGES

* Tag#render now returns void, use emitter argument
to write rendered html.
* ship to Node.js 8, the dist/liquid.cjs.js (main) nolonger
supports Node.js 6, other bundles are also provided via dist/liquid.esm.js, dist/liquid.js (ES5 umd) and liquid.min.js (minified ES5 umd)
* remove default export, now should be used like import
{Liquid} from 'liquidjs'
@harttle
Copy link
Owner

harttle commented Aug 26, 2019

It's now fixed on 9.0.0, see

it('should output contents before continue', async function () {
and
it('should output contents before break', async function () {
, closing.

@harttle harttle closed this as completed Aug 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants