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

docs(img-tag): title text should be quoted #1256

Merged
merged 1 commit into from
Dec 17, 2019

Conversation

curbengh
Copy link
Contributor

@curbengh curbengh commented Dec 16, 2019

Check List

Please read and check followings before submitting a PR.

  • Others (Update, fix, translation, etc...)

The current example:

{% img class-name /path/to/image 100 100 "title text 'alt text'" %}

<img src="/path/to/image" class="class-name" width="100" height="100" title="title text " alt="alt text">

Notice the trailing space in the title attribute.

The correct usage is to quote both title and alt, then quote both of them:

{% img class-name /path/to/image 100 100 '"title text" "alt text"' %}

<img src="/path/to/image" class="class-name" width="100" height="100" title="title text" alt="alt text">

"'title text' 'alt text'" also works.

Closes hexojs/hexo#1277

@curbengh curbengh merged commit 4f48734 into hexojs:master Dec 17, 2019
@curbengh curbengh deleted the imgtag-quote branch December 17, 2019 01:47
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.

Spaced string in imgTag
2 participants