{"action":"closed","issue":{"url":"https://api.github.com/repos/zhuochun/md-writer/issues/115","labels_url":"https://api.github.com/repos/zhuochun/md-writer/issues/115/labels{/name}","comments_url":"https://api.github.com/repos/zhuochun/md-writer/issues/115/comments","events_url":"https://api.github.com/repos/zhuochun/md-writer/issues/115/events","html_url":"https://github.com/zhuochun/md-writer/issues/115","id":129670482,"number":115,"title":"Uncaught SyntaxError: Invalid regular expression: /^[(\\d{4})-(\\d{2})-(\\d{2})] - ([\\s\\S] )(\\.\\w )$...","user":{"login":"svnsbck","id":8381669,"avatar_url":"https://avatars.githubusercontent.com/u/8381669?v=3","gravatar_id":"","url":"https://api.github.com/users/svnsbck","html_url":"https://github.com/svnsbck","followers_url":"https://api.github.com/users/svnsbck/followers","following_url":"https://api.github.com/users/svnsbck/following{/other_user}","gists_url":"https://api.github.com/users/svnsbck/gists{/gist_id}","starred_url":"https://api.github.com/users/svnsbck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svnsbck/subscriptions","organizations_url":"https://api.github.com/users/svnsbck/orgs","repos_url":"https://api.github.com/users/svnsbck/repos","events_url":"https://api.github.com/users/svnsbck/events{/privacy}","received_events_url":"https://api.github.com/users/svnsbck/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/zhuochun/md-writer/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-29T05:26:15Z","updated_at":"2016-01-29T17:23:53Z","closed_at":"2016-01-29T17:23:53Z","body":"Hi!\r\n\r\nFor some reason I'm getting this error, when trying to _publish a draft_ to my local Dropbox folder. Creating a _Draft_ or a _Post_ does work as it is supposed to. Publishing a _draft_ through results in this error. It used to work and I'm not sure where the error is.\r\n\r\nAny help appreciated.\r\n\r\nCheers,\r\n\r\nSven\r\n\r\n\r\n\r\n**Atom Version**: 1.4.1\r\n**System**: Mac OS X 10.11.1\r\n**Thrown From**: [markdown-writer](https://github.com/zhuochun/md-writer) package, v2.2.0\r\n\r\n\r\n### Stack Trace\r\n\r\nUncaught SyntaxError: Invalid regular expression: /^[(\\d{4})-(\\d{2})-(\\d{2})] - ([\\s\\S] )(\\.\\w )$/: Range out of order in character class\r\n\r\n```\r\nAt /Users/blah/.atom/packages/markdown-writer/lib/utils.coffee:104\r\n\r\nSyntaxError: Invalid regular expression: /^[(\\d{4})-(\\d{2})-(\\d{2})] - ([\\s\\S] )(\\.\\w )$/: Range out of order in character class\r\n    at new RegExp (native)\r\n    at RegExp (native)\r\n    at Object.untemplate (/Users/blah/.atom/packages/markdown-writer/lib/utils.coffee:104:33)\r\n    at Object.parseFileSlug (/Users/blah/.atom/packages/markdown-writer/lib/helpers/template-helper.coffee:42:18)\r\n    at PublishDraft.module.exports.PublishDraft.getSlug (/Users/blah/.atom/packages/markdown-writer/lib/commands/publish-draft.coffee:74:28)\r\n    at Object.getFrontMatter (/Users/blah/.atom/packages/markdown-writer/lib/helpers/template-helper.coffee:31:21)\r\n    at PublishDraft.module.exports.PublishDraft.getPostPath (/Users/blah/.atom/packages/markdown-writer/lib/commands/publish-draft.coffee:57:33)\r\n    at PublishDraft.module.exports.PublishDraft.trigger (/Users/blah/.atom/packages/markdown-writer/lib/commands/publish-draft.coffee:22:18)\r\n    at atom-text-editor.<anonymous> (/Users/blah/.atom/packages/markdown-writer/lib/markdown-writer.coffee:91:24)\r\n    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)\r\n    at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61\r\n    at CommandPaletteView.module.exports.CommandPaletteView.confirmed (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/command-palette/lib/command-palette-view.js:183:32)\r\n    at CommandPaletteView.module.exports.SelectListView.confirmSelection (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:338:21)\r\n    at space-pen-div.atom.commands.add.core:confirm (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:109:19)\r\n    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)\r\n    at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61\r\n    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:536:16)\r\n    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:359:22)\r\n    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:97:36)\r\n    at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)\r\n```\r\n\r\n### Commands\r\n\r\n```\r\n     -0:54 markdown-writer:new-post (atom-text-editor.editor)\r\n     -0:50 core:confirm (atom-text-editor.editor.mini.is-focused)\r\n     -0:42.9.0 core:move-to-bottom (atom-text-editor.editor.is-focused)\r\n     -0:42.6.0 markdown-writer:insert-new-line (atom-text-editor.editor.is-focused)\r\n     -0:42.6.0 editor:newline (atom-text-editor.editor.is-focused)\r\n     -0:42.4.0 markdown-writer:insert-new-line (atom-text-editor.editor.is-focused)\r\n     -0:42.4.0 editor:newline (atom-text-editor.editor.is-focused)\r\n  7x -0:38.7.0 core:backspace (atom-text-editor.editor.is-focused)\r\n     -0:28.8.0 markdown-writer:insert-new-line (atom-text-editor.editor.is-focused)\r\n     -0:28.8.0 editor:newline (atom-text-editor.editor.is-focused)\r\n     -0:28.6.0 markdown-writer:insert-new-line (atom-text-editor.editor.is-focused)\r\n     -0:28.6.0 editor:newline (atom-text-editor.editor.is-focused)\r\n     -0:27.5.0 core:save (atom-text-editor.editor.is-focused)\r\n     -0:05.5.0 command-palette:toggle (atom-text-editor.editor.is-focused)\r\n     -0:02.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)\r\n     -0:02.4.0 markdown-writer:publish-draft (atom-text-editor.editor)\r\n```\r\n\r\n### Config\r\n\r\n```json\r\n{\r\n  \"core\": {\r\n    \"disabledPackages\": [\r\n      \"center-screen\",\r\n      \"minimap\"\r\n    ],\r\n    \"themes\": [\r\n      \"native-ui\",\r\n      \"one-light-syntax\"\r\n    ]\r\n  },\r\n  \"markdown-writer\": {\r\n    \"fileExtension\": \".md\",\r\n    \"newPostFileName\": \"[{year}-{month}-{day}] - {title}{extension}\",\r\n    \"siteDraftsDir\": \"[Drafts]\",\r\n    \"siteLocalDir\": \"/Users/blah/Dropbox/[Writing]\",\r\n    \"sitePostsDir\": \"[Posts]/[{year}]\"\r\n  }\r\n}\r\n```\r\n\r\n### Installed Packages\r\n\r\n```coffee\r\n# User\r\nfile-icons, v1.6.14\r\nmarkdown-mindmap, v0.2.4\r\nmarkdown-table-formatter, v2.7.2\r\nmarkdown-writer, v2.2.0\r\nnative-ui, v0.16.1\r\ntypewriter, v0.3.5\r\nwordcount, v2.5.0\r\n\r\n# Dev\r\nNo dev packages\r\n```\r\n\r\n"}}