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

Another parsing bug #15

Closed
Wuvist opened this issue Jun 25, 2014 · 0 comments
Closed

Another parsing bug #15

Wuvist opened this issue Jun 25, 2014 · 0 comments

Comments

@Wuvist
Copy link
Member

Wuvist commented Jun 25, 2014

@section js {
    <script src="/js/jquery.rwdImageMaps.min.js"></script>
    @if custom["js"] != "" {
        <script src="@custom["js"]"></script>
    }
    <script type="text/javascript">
        $(document).ready(function(e) {
            $('img[usemap]').rwdImageMaps();
        });
    </script>
}

gives

    js := func() string {
        var _buffer bytes.Buffer

        _buffer.WriteString("<script src=\"/js/jquery.rwdImageMaps.min.js\"></script>")

        if custom["js"] != "" {

            _buffer.WriteString("<script src=\"")
            _buffer.WriteString(gorazor.HTMLEscape(custom["js"]))
            _buffer.WriteString("\"></script>")

            return _buffer.String()
        }

        _buffer.WriteString("<script type=\"text/javascript\">\n        $(document).ready(function(e) {\n           $('img[usemap]').rwdImageMaps();\n      });\n   </script>")

    }

should be

    js := func() string {
        var _buffer bytes.Buffer

        _buffer.WriteString("<script src=\"/js/jquery.rwdImageMaps.min.js\"></script>")

        if custom["js"] != "" {

            _buffer.WriteString("<script src=\"")
            _buffer.WriteString(gorazor.HTMLEscape(custom["js"]))
            _buffer.WriteString("\"></script>")

        }

        _buffer.WriteString("<script type=\"text/javascript\">\n        $(document).ready(function(e) {\n           $('img[usemap]').rwdImageMaps();\n      });\n   </script>")
        return _buffer.String()
    }
@Wuvist Wuvist closed this as completed Jun 25, 2014
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