Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating post bug #539

Closed
viniciusmo opened this issue Mar 17, 2014 · 5 comments
Closed

Creating post bug #539

viniciusmo opened this issue Mar 17, 2014 · 5 comments
Labels
bug Something isn't working

Comments

@viniciusmo
Copy link

The title of my post is "how to do port forwarding with C + + like adb forward tcp: 8081 tcp: 8082" and when I run hexo new 'how to do port forwarding with C + + like adb forward tcp: 8081 tcp: 8082" launches the following error:

[error] SyntaxError: Invalid regular expression: / ^ how-to-the-port-forwarding-with-c + +-like-adb-forward-tcp8081-tcp8082-(\ d +) /: Nothing to repeat
SyntaxError: Invalid regular expression: / ^ how-to-the-port-forwarding-with-c + +-like-adb-forward-tcp8081-tcp8082-(\ d +) /: Nothing to repeat
     at new RegExp (<anonymous>)
     at / usr / local / lib / node_modules / hexo / lib / post / create.js: 62:17
     at ReaddirReq.Req.done (/ usr / local / lib / node_modules / hexo / node_modules / graceful-fs / graceful-fs.js: 144:5)
     at ReaddirReq.done (/ usr / local / lib / node_modules / hexo / node_modules / graceful-fs / graceful-fs.js: 91:22)
     at Object.oncomplete (fs.js: 107:15)

The problem is because of the "++".

@tommy351 tommy351 added the bug label Mar 17, 2014
@chenall
Copy link
Contributor

chenall commented Mar 18, 2014

you can do that,
hexo new 'port_forwarding_with_cplusplus'
and then set post title meta inside post.

title: 'how to do port forwarding with C + + like adb forward tcp: 8081 tcp: 8082"

@WilliamHuey
Copy link

Commit 301cab7 broke regex pattern.

npm test is failing. Can not run hexo commands.

@tommy351
Copy link
Member

Fixed in 4e17780

@theme
Copy link

theme commented May 23, 2014

文件名有 " ----- " 的时候生成 post 结果有误:

$ hexo new "这是-------部分文件名"
[info] File created at /home/user/blog/source/_posts/这是-------部分文件名.md

$ cat ./source/_posts/这是-------部分文件名.md 
title: [译]另外一篇东西
date: 2014-05-23 14:17:22
tags:
---
一些内容。

以 "[译" 为 title 开头的文章 generate 有误 :

...
[create] Public: 2014/05/23/[译]另外一篇东西/index.html
[create] Public: about/index.html
[create] Public: about/index-7.html
[create] Public: 2014/05/23/这是-------部分文件名/index.html
[info] 29 files generated in 0.790s
user@ubuntu:~/blog/$ hexo server
oups 另外一篇东西
[info] Hexo is running at http://localhost:4000/blog/. Press Ctrl+C to stop.

screenshot from 2014-05-23 14 29 40

@tommy351
Copy link
Member

@theme You should create a new issue. Your problem is not related to this issue obviously.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants