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

Prevent adding empty parameters to attribute #30

Closed
isteven opened this issue Sep 29, 2014 · 2 comments
Closed

Prevent adding empty parameters to attribute #30

isteven opened this issue Sep 29, 2014 · 2 comments

Comments

@isteven
Copy link

isteven commented Sep 29, 2014

Somehow the hljs directive adds empty parameters to attributes.

Let's say I have this directive declaration:

<div hljs>
    <div myDirective></div>
</div>

After applying your hljs directive, it becomes:

<div myDirective=""></div>

Can you help to fix this? Thanks.

@pc035860
Copy link
Owner

Hi @isteven ,

I think the ="" after the HTML attribute is automatically appended by browser during parsing your HTML.
To avoid this, use hljs source or hljs include to bypass the browser's parsing mechanism.

@isteven
Copy link
Author

isteven commented Sep 29, 2014

hi @pc035860 ,

Using hljs source works. But I'm not sure why my browser (Latest version of Google chrome) adds something like that.

Closing this issue. 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

No branches or pull requests

2 participants