5

Is lightning case sensitive (or) is it something else that is causing this behavior? I was looking into Lightning badges on trailhead and when I tried to compile this code, as a salesforce developer I expected this code to compile ( not a good practice to have mix case).

<aura:component >
    <h1 style="font-size:16px"> Camping List </H1>
</aura:component>

But the component won't compile and gives the following error:

Failed to save undefined: markup://prao6308:campingHeader:2,45: ParseError at [row,col]:[3,45] Message: The element type "h1" must be terminated by the matching end-tag "".

Can someone please throw some light on why the compiler wont match <h1> with </H1>?
4
  • 5
    As lightning is based on aura framework which is a type of JavaScript and JavaScript is case sensitive so I think lightning is also case sensitive Sep 27, 2016 at 17:53
  • 2
    releasenotes.docs.salesforce.com/en-us/spring15/release-notes/… I remember using mix case and this has changed starting spring 15. @Tushar post your comment as answer I will accept :)
    – Rao
    Sep 27, 2016 at 17:56
  • 5
    Also, XML is case-sensitive in the general sense (HTML is less particular), so this also makes sense.
    – sfdcfox
    Sep 27, 2016 at 19:11
  • Answer is added. Sep 28, 2016 at 4:26

1 Answer 1

6

As lightning is based on aura framework which is a type of JavaScript and JavaScript is case sensitive so lightning is also case sensitive.

And from Spring 15 Release Notes it is mentioned that Lightning components are now case sensitive.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .