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

May I use [] square brackets and : colon in article title? #1113

Closed
kuanyui opened this issue Mar 14, 2015 · 4 comments
Closed

May I use [] square brackets and : colon in article title? #1113

kuanyui opened this issue Mar 14, 2015 · 4 comments

Comments

@kuanyui
Copy link

kuanyui commented Mar 14, 2015

May I use square brackets [] or colon : in article title?

I often need to write a title like [Emacs] Write A Major Mode or Emacs: Write A Major Mode, but they will cause error when processing article:

square brackets:

00:23:03.176 ERROR Process failed: _posts/emacs-write-a-major-mode.md
JS-YAML: can not read a block mapping entry; a multiline key may not be an implicit key at line 2, column 5:
date: 2015-03-07 15:42:36
    ^

colon:

JS-YAML: incomplete explicit mapping pair; a key node is missed at line 1, column 14:
title: Emacs: Write A Major Mode

If use a escape \ before bracket, it will be rendered as explicitly \[Emacs\]

With earlier version Hexo, at least, the later one is acceptable by processor.

hexo: 3.0.0
os: Linux 3.11.10-25-desktop linux x64
http_parser: 1.0
node: 0.10.29
v8: 3.14.5.9
ares: 1.9.0-DEV
uv: 0.10.27
zlib: 1.2.3
modules: 11
openssl: 1.0.1h
@kuanyui kuanyui changed the title May I use brackets and colon in article title? May I use [] square brackets and : colon in article title? Mar 14, 2015
@celsomiranda
Copy link

Have you tried to write the frontmatter like this:

title: "[Emacs] Write A Major"

or

title: '[Emacs] Write A Major'

@kuanyui
Copy link
Author

kuanyui commented Mar 15, 2015

Yes, it works! I didn't find this ˊ・w・ˋ Thanks a lot!

@kuanyui kuanyui closed this as completed Mar 15, 2015
@practicalli-johnny
Copy link

You could use the - character. So you could have a title in the form Emacs - Write a Major Mode

Thanks

@nkcoder
Copy link

nkcoder commented Jan 12, 2016

I have the same problem, thank you!

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

No branches or pull requests

4 participants