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

Can't have multiple @exec on same line #138

Open
JaroVDH opened this issue Sep 13, 2019 · 1 comment
Open

Can't have multiple @exec on same line #138

JaroVDH opened this issue Sep 13, 2019 · 1 comment

Comments

@JaroVDH
Copy link

JaroVDH commented Sep 13, 2019

There seems to be an issue with @exec that makes it return undefined and stop parsing if you have multiple on the same line.

Here's a (failing) test for it, in the style of your tests:

it('and work with subsequent execs', function() {
	input = '/* @exec hello(buddy) */, /* @exec hello(buddy) */';
	pp.preprocess(input, {
		'hello': helloSpy,
		'buddy': 'Michael Jackson'
	}, 'js').should.equal('Hello Michael Jackson, Hello Michael Jackson!');
});

Expected: "Hello Michael Jackson, Hello Michael Jackson"
Received: "Hello undefined"

The test is Javascript, because that's where I found it, but it happens for all as far as I can tell.

If you add a linebreak between them, it does seem to work.

@JaroVDH
Copy link
Author

JaroVDH commented Sep 13, 2019

From the activity here, seems like this project has all but been abandoned.
Shame, it's really useful.

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

No branches or pull requests

1 participant