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

Fix for skipping last two nodes in processing #7

Closed
wants to merge 1 commit into from
Closed

Fix for skipping last two nodes in processing #7

wants to merge 1 commit into from

Conversation

thefourtheye
Copy link
Contributor

It skips the processing of last two nodes. The example itself doesnt work, because of this bug.

bin/swiffer examples/jsControl.tl

doesn't show anything in the console. With this fix, it shows the following

Line p, Column o: Use one of the available special characters: s, n, r, lb, rb
@if is deprecated. Please use @eq, @gt, @lt, etc.

It skips the processing of last two nodes. The example itself doesnt work, because of this bug.
```
bin/swiffer examples/jsControl.tl
```
doesn't show anything in the console. With this fix, it shows the following
```
Line p, Column o: Use one of the available special characters: s, n, r, lb, rb
@if is deprecated. Please use @eq, @gt, @lt, etc.
```
@smfoote
Copy link
Owner

smfoote commented Jul 26, 2013

Sorry for the confusion on this one. The reason for using node.length - 2 instead of the full node.length is a dependence on a very recent change to Dust.js, which adds lines and columns as the last two items of each node.

Until a new version of Dust gets pushed to npm, the best thing to do is probably:

  1. Clone LinkedIn's fork of Dust.js
$ git clone https://github.com/linkedin/dustjs.git
  1. Copy everything in the Dust.js directory into the dustjs-linkedin directory in Swiffer's node_modules directory:
$ cp -R /path/to/dustjs/* /path/to/swiffer/node_modules/dustjs_linkedin/.
  1. Try running an example again (from within the swiffer directory:
$ bin/swiffer examples/jsControl.tl

Expected output:

Line 5, Column 1: Use one of the available special characters: s, n, r, lb, rb
Line 6, Column 1: @if is deprecated. Please use @eq, @gt, @lt, etc.

@smfoote smfoote closed this Jul 26, 2013
@smfoote
Copy link
Owner

smfoote commented Jul 26, 2013

The latest revision of Dust (2.0.1) has been published to npm, so all you need to do now is run npm install.

@thefourtheye
Copy link
Contributor Author

Perfect. Thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants