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

Fix issue cannot correctly analyze arguments with space in tag #1581

Merged
merged 3 commits into from
Dec 4, 2015

Conversation

winterTTr
Copy link
Contributor

I found that when use the tag with space in parameter, even i wrapped it within a string literal, it do not work. For example:

{% qnimg "image path with space" %}

when this (custom) tag is process, the arguments will become an array of

["image", "path", "with", "space"]

instead of

["image path with space"]

This is a big issue for any kind of tag ( no matter hexo native tag or custom tag plugin).

I found that the issue is, hexo simply connect all the lexical node to a string and then split it with space, this is not correct and result in the issue i mention.

So i fix it.

@winterTTr
Copy link
Contributor Author

AssertionError: expected Fri, 06 Nov 2015 14:26:59 GMT to deeply equal Fri, 06 Nov 2015 14:26:59 GMT
+ expected - actual

-[Date: 2015-11-06T14:26:59.243Z]
+[Date: 2015-11-06T14:26:59.000Z]

at C:\projects\hexo\test\scripts\processors\post.js:505:33
at tryCatcher (C:\projects\hexo\node_modules\hexo-fs\node_modules\bluebird\js\main\util.js:26:23)
at Promise._settlePromiseFromHandler (C:\projects\hexo\node_modules\hexo-fs\node_modules\bluebird\js\main\promise.js:505:31)
at Promise._settlePromiseAt (C:\projects\hexo\node_modules\hexo-fs\node_modules\bluebird\js\main\promise.js:581:18)
at Promise._settlePromises (C:\projects\hexo\node_modules\hexo-fs\node_modules\bluebird\js\main\promise.js:697:14)

Seems this error is not coming from my change? Let me know if this is real my fault.

@winterTTr
Copy link
Contributor Author

I explain more detail of my fix here
http://winterttr.me/2015/11/07/hexo-cannot-use-space-within-tag-arguments/

@Xuanwo
Copy link
Contributor

Xuanwo commented Dec 4, 2015

@winterTTr
I rechack the fault, and it looks like an error on system time.
And sorry for my rebuild operation, no one will see what happened indeed beacuse the changes of .travis.yml.
Now I will merge it into master, thank you for your work.
Fix #1455

Xuanwo pushed a commit that referenced this pull request Dec 4, 2015
Fix issue cannot correctly analyze arguments with space in tag
@Xuanwo Xuanwo merged commit 7433af3 into hexojs:master Dec 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants