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

Code inside of comments is evaluated if within opening and closing tags #77

Open
paulyoung opened this issue Jul 10, 2014 · 2 comments
Open

Comments

@paulyoung
Copy link

I'm attempting to document some functions using Codo and my example code within comments is being evaluated.

The following is the beginning of a file called _partials/helpers.html which is a partial that I include elsewhere.

{{
  # Create an alias.
  #
  # @example Create a selector alias for a single element.
  #
  #   <!-- template.html -->
  #   {{ sectionId = @createAlias 'section' }}
  #   <section id="{{-sectionId}}"></section>

This causes the following: Fatal error: sectionId is not defined in helpers on line 8

This is just one example that could be generalized in a test as:

{{
  # {{- foo }}
}}
@paulyoung
Copy link
Author

Obviously, I'm using {{ and }} for opening and closing tags.

@paulyoung
Copy link
Author

My current workaround is this:

{{
  # Create an alias.
  #
  # @example Create a selector alias for a single element.
  #
  #   <!-- template.html -->
  #   <% sectionId = @createAlias 'section' %>
  #   <section id="<%- sectionId %>"></section>

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