Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

Uncaught SyntaxError: Invalid regular expression #27

Closed
ghost opened this issue May 18, 2015 · 6 comments
Closed

Uncaught SyntaxError: Invalid regular expression #27

ghost opened this issue May 18, 2015 · 6 comments
Assignees
Labels

Comments

@ghost
Copy link

ghost commented May 18, 2015

[Enter steps to reproduce below:]

  1. Start atom
  2. Type in /*** and then the character @ (note: which because of Right ALT not supported (bad for International Keyboards) atom-keymap#35 is actually executing Ctrl+Alt+Q which executes autoflow:reflow-selection)

This problem appears on my PC with Windows 7 64-bit, but this doesn't occur on my linux laptop. I have a german keyboard layout.

Atom Version: 0.199.0
System: lukas-PC
Thrown From: autoflow package, v0.23.0

Stack Trace

Uncaught SyntaxError: Invalid regular expression: /^/*** /: Nothing to repeat

At C:\Users\lukas\AppData\Local\atom\app-0.199.0\resources\app.asar\node_modules\autoflow\lib\autoflow.js:42

SyntaxError: Invalid regular expression: /^/\*** /: Nothing to repeat
  at new RegExp (native)
  at C:\Users\lukas\AppData\Local\atom\app-0.199.0\resources\app.asar\node_modules\autoflow\lib\autoflow.js:42:47
  at Object.module.exports.reflow (C:\Users\lukas\AppData\Local\atom\app-0.199.0\resources\app.asar\node_modules\autoflow\lib\autoflow.js:45:13)
  at Object.module.exports.reflowSelection (C:\Users\lukas\AppData\Local\atom\app-0.199.0\resources\app.asar\node_modules\autoflow\lib\autoflow.js:24:27)
  at atom-text-editor.atom.commands.add.autoflow:reflow-selection (C:\Users\lukas\AppData\Local\atom\app-0.199.0\resources\app.asar\node_modules\autoflow\lib\autoflow.js:7:26)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\lukas\AppData\Local\atom\app-0.199.0\resources\app.asar\src\command-registry.js:238:29)
  at C:\Users\lukas\AppData\Local\atom\app-0.199.0\resources\app.asar\src\command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (C:\Users\lukas\AppData\Local\atom\app-0.199.0\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:519:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (C:\Users\lukas\AppData\Local\atom\app-0.199.0\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:354:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (C:\Users\lukas\AppData\Local\atom\app-0.199.0\resources\app.asar\src\window-event-handler.js:178:20)

Commands

  4x -0:23.7.0 editor:newline (atom-text-editor.editor.is-focused)
  2x -0:23.2.0 core:move-up (atom-text-editor.editor.is-focused)
     -0:17.3.0 editor:newline (atom-text-editor.editor.is-focused)
     -0:15.5.0 autoflow:reflow-selection (atom-text-editor.editor.is-focused)
  2x -0:14.3.0 editor:delete-to-beginning-of-word (atom-text-editor.editor.is-focused)
     -0:13.6.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:11.6.0 autoflow:reflow-selection (atom-text-editor.editor.is-focused)

Config

{}

Installed Packages

# User
language-powershell, v2.0.1

# Dev
No dev packages
@lee-dohm
Copy link
Contributor

Are you using a US English keyboard layout? Or some other one?

@ghost
Copy link
Author

ghost commented May 18, 2015

Sorry, a german keyboard layout.

@ghost
Copy link
Author

ghost commented May 18, 2015

Okay, in this case I think the issue can be closed, or? Ty very much, I was confused why that problem only occurs on windows.

@lee-dohm
Copy link
Contributor

Well, I think this is still a valid bug ... let me just try to reproduce it.

@lee-dohm
Copy link
Contributor

I can reproduce it using Atom v0.200.0-1a8ebd5 on Mac OS X 10.10.3 with the following repro steps:

  1. Open Atom
  2. Open a new file with Cmd+N
  3. Type /*** into the editor
  4. Execute the autoflow:reflow-selection command with Cmd+Alt+Q

Expected: Nothing to happen (no reflow needs to occur)
Actual: Error notification appears

@kevinsawicki
Copy link
Contributor

Thanks so much for reporting this, it will be fixed in the next Atom release, 0.201.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants