Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to comment - commenting syntax

Can someone please tell me how to comment inside the code? I tried the //comment but it does not work and searching for "comment" in a forum is ridiculous. Thank you.

Comments

  • You can add comments to the three different code areas (Javascript, Stylesheet, Passage) but the formats you can use depend on two things:

    1. The Area you are trying to add a comment to.
    The Story Javascript and Stylesheet areas support the comment formats supported by the programming language (Javascript and CSS) used within each area, so:

    a. Javascript supports
    // This is a single line Javascript comment.
    /* This is a multi-line
    Javascript comment */
    
    b. CSS supports
    /* This is a single line CSS comment. */
    /* This is a multi-line
    CSS comment. */
    

    2. The Story Format you are using.
    The comment formats that are supported in a Passage based on which story format you are using.

    a. Harlowe:
    <!-- Singe line comment. Totally removed from generated HTML -->
    <!-- Multi-line comment.
    Totally removed from generated HTML -->
    
    b. Snowman:
    // Single line comment. Totally removed from generated HTML
    /* Single line comment. Totally removed from generated HTML */
    <!-- Single line comment. Appears in generated HTML -->
    <!-- Multi-line comment.
    Appears in generated HTML -->
    
    c. SugarCube 1:
    /* Singe line comment. Totally removed from generated HTML */
    /* Multi-line comment.
    Totally removed from generated HTML */
    /% Singe line comment. Totally removed from generated HTML %/
    /% Multi-line comment.
    Totally removed from generated HTML %/
    <!-- Single line comment. Appears in generated HTML-->
    
  • Thank you!!!
Sign In or Register to comment.