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

Line breaks are not formatted properly #11

Closed
eburns1148 opened this issue Nov 17, 2014 · 16 comments
Closed

Line breaks are not formatted properly #11

eburns1148 opened this issue Nov 17, 2014 · 16 comments

Comments

@eburns1148
Copy link

When the TemplateProcessorUtil.formatHtml() is complete, a back slash is put on the next line.

As a result, I am getting 'Unterminated String Literal' in FireFox and 'Unexpected token ILLEGAL' in Chrome. Every template breaks.

create-edit.tpl.html:

<button class="btn btn-default" ng-click="onClick()" ng-disabled="isDisabled">
    <span class="fa fa-plus-circle"></span> Create {{resourceName}}
</button>

Is being generated as:

            angular.module('grails.directives.buttons').run(['$templateCache', function($templateCache) {
                $templateCache.put('create-button.html', '<button class="btn btn-default" ng-click="onClick()" ng-disabled="isDisabled">
 \
    <span class="fa fa-plus-circle"></span> Create {{resourceName}}
 \
</button>');
            }]);
@craigburke
Copy link
Owner

Are you using Windows by chance?

@eburns1148
Copy link
Author

Yes. Windows development environment and a Linux Git server. If that may make a difference.

@craigburke
Copy link
Owner

Ok, I had another similar issue filed. I'll do another release shortly that should address this.

@eburns1148
Copy link
Author

Ok great. I've been stuck on this for about a week now. It seems to happen randomly.

@craigburke
Copy link
Owner

Did you set compressHtml = false as well?

@eburns1148
Copy link
Author

I've been using the default settings. I can try with compressHtml set to false.

@craigburke
Copy link
Owner

No need to do that. Just hold tight.

@eburns1148
Copy link
Author

Oh ok. Will do.

@craigburke
Copy link
Owner

Give version 1.4.1 a spin if you would.

@eburns1148
Copy link
Author

Great. I will be back with feedback shortly.

@eburns1148
Copy link
Author

The IDE hangs when I try to add/install the new plugin.

runtime ":angular-template-asset-pipeline:1.4.1"

Here's the error:

Resolve error obtaining dependencies: Failed to read artifact descriptor for org.grails.plugins:angular-template-asset-pipeline:zip:1.4.1

@eburns1148
Copy link
Author

Is it because you have two repositories for the same plugin?

https://github.com/craigburke/angular-template-asset-pipeline -> Grails is pulling from this repository, which isn't updated

https://github.com/craigburke/angular-template-grails-asset-pipeline -> This one is updated

http://grails.org/plugin/angular-template-asset-pipeline -> Say's 1.4.1, but the source points to an older version.

@craigburke
Copy link
Owner

No I don't think so. The first repo isn't even a grails plugin (it's in preparation of Asset Pipeline 2.0).

I'll update the link on the grails site, but I don't think it should matter. Does restarting your IDE help?

@eburns1148
Copy link
Author

It may be an issue on my end. I'll try restarting eclipse again.

@eburns1148
Copy link
Author

Awesome, works perfectly. Thanks for your help and a great plugin.

@craigburke
Copy link
Owner

Thanks man. You might also like my lazybones plugin ;)
http://www.craigburke.com/2014/11/17/angular-grails-template-1.html

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

2 participants