squirrellyjs / squirrelly

Semi-embedded JS template engine that supports helpers, filters, partials, and template inheritance. 4KB minzipped, written in TypeScript ⛺
https://squirrelly.js.org
MIT License
635 stars 83 forks source link

Comment about reassigning lastIndex #62

Closed first-timers[bot] closed 6 years ago

first-timers[bot] commented 6 years ago

🆕🐥☝ First Timers Only.

This issue is reserved for people who never contributed to Open Source before. We know that the process of creating a pull request is the biggest barrier for new contributors. This issue is for you 💝

About First Timers Only.

🤔 What you will need to know.

Nothing. This issue is meant to welcome you to Open Source :) We are happy to walk you through the process.

📋 Step by Step

@@ -83,7 +83,7 @@ function Compile (str) {
         var nativeH = nativeHelpers[parent.name]
         if (nativeH.blocks && nativeH.blocks[m[9]]) {
           funcStr += nativeH.blocks[m[9]](parent.id)
-          lastIndex = regEx.lastIndex
+          lastIndex = regEx.lastIndex // Some native helpers set regEx.lastIndex
         } else {
           console.warn("Native helper '%s' doesn't accept that block.", parent.name)
         }
  1. If you are familiar with the terminal or would like to learn it, here is a great tutorial on how to send a pull request using the terminal.

  2. You can edit files directly in your browser

🤔❓ Questions

Leave a comment below!

This issue was created by First-Timers-Bot.

Dravinbhatia commented 6 years ago

heyy....i want to claim this issue....

nebrelbug commented 6 years ago

@Dravinbhatia great! Reserved.