@imenam/refactoring-mcp 3.1.0 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,6 +39,13 @@ function countBracesInLine(line) {
39
39
  let inDoubleQuote = false;
40
40
  for (let i = 0; i < line.length; i++) {
41
41
  const ch = line[i];
42
+ // Stop at line comments (// or #) when outside of strings
43
+ if (!inSingleQuote && !inDoubleQuote) {
44
+ if (ch === "/" && line[i + 1] === "/")
45
+ break;
46
+ if (ch === "#")
47
+ break;
48
+ }
42
49
  if (ch === "'" && !inDoubleQuote)
43
50
  inSingleQuote = !inSingleQuote;
44
51
  else if (ch === '"' && !inSingleQuote)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imenam/refactoring-mcp",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "description": "MCP server to copy or move code blocks between files, with optional directory confinement.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",