bdkjones / Kit

The Kit Compiler, as implemented in CodeKit
77 stars 6 forks source link

Capital-lettered variables get included in the output #7

Open ghost opened 10 years ago

ghost commented 10 years ago

A variable defined with a capital letter <!-- $Foo = Baz --> will get included in the compiled html, whereas <!-- $foo = Baz --> and <!-- $fooBar = Baz --> behave as expected.

bdkjones commented 10 years ago

Please post an example file that shows the issue. I’ve heard of this before, but have never been able to duplicate the behavior on my machine.

On 28 Sep 2014, at 21:46, indrekpaas notifications@github.com wrote:

A variable defined with a capital letter will get included in the compiled html, whereas and behave as expected.

— Reply to this email directly or view it on GitHub.

calvinjuarez commented 9 years ago

CodeKit 2.2 (18493) on OS X Yosemite 10.10.2

I'm seeing this issue, too. Here's how I replicated.

root.kit

<!-- @At     at sign -->
<!-- $Dollar dollar sign -->

<!--@At-->
<!-- @At -->
<!--$Dollar-->
<!-- $Dollar -->

root.html

<!-- @At     at sign -->
<!-- $Dollar dollar sign -->

<!--@At-->
<!-- @At -->
<!--$Dollar-->
<!-- $Dollar -->

How the variable is declared doesn't matter (e.g. <!-- @At: at sign --> or <!--$Dollar=dollar sign--> also produce incorrect output).

bdkjones commented 9 years ago

Interesting. I’ll take a look. By convention in most programming languages, variables always start with a lowercase character. Only class names start with an uppercase letter.

On 19 Mar 2015, at 15:59, calvin notifications@github.com wrote:

CodeKit 2.2 (18493) on OS X Yosemite 10.10.2

I'm seeing this issue, too. Here's how I replicated.

root.kit

root.html

How the variable is declared doesn't matter (e.g. or also produce incorrect output).

— Reply to this email directly or view it on GitHub https://github.com/bdkjones/Kit/issues/7#issuecomment-83794510.

calvinjuarez commented 9 years ago

Yeah, I don't know that I've ever done this myself; I was just able to replicate the issue. Since it's unexpected behavior, it seemed worth looking at.