spdr870/gitextensions — Issue #825: Add Lua & Perl sources support
Author: pravic
Created: 2012-03-06 00:32:24+00:00
State: open

```
--- CodeFile0.cs	2012-03-03 01:25:42.000000000 +0200
+++ CodeFile.cs	2012-03-06 02:31:29.147000000 +0200
@@ -103,6 +103,10 @@
NumberCommentsLines++;
else if (File.Extension.ToLower() == ".rb" && line.StartsWith("#"))
NumberCommentsLines++;
+ else if (File.Extension.ToLower() == ".pl" && line.StartsWith("#"))
+ NumberCommentsLines++;
+ else if (File.Extension.ToLower() == ".lua" && line.StartsWith("--"))
+ NumberCommentsLines++;

if (!_skipResetFlag)
ResetCodeBlockFlags(line);
@@ -137,6 +141,10 @@

if (File.Extension.ToLower() == ".rb" && line.StartsWith("=begin"))
_inCommentBlock = true;
+ else if (File.Extension.ToLower() == ".pl" && line.StartsWith("=begin"))
+ _inCommentBlock = true;
+ else if (File.Extension.ToLower() == ".lua" && line.StartsWith("--[["))
+ _inCommentBlock = true;

if (File.Extension.ToLower() == ".py" && !_inCommentBlock)
{
@@ -169,6 +177,10 @@

if (File.Extension.ToLower() == ".rb" && line.Contains("=end"))
_inCommentBlock = false;
+ else if (File.Extension.ToLower() == ".pl" && line.Contains("=end"))
+ _inCommentBlock = false;
+	else if (File.Extension.ToLower() == ".lua" && line.Contains("]]"))
+ _inCommentBlock = false;

if (File.Extension.ToLower() == ".py")
{
```