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

Bootstrap callout 任意两个完整的{% note classname %}{% endnote %}之间内容渲染出错。 #1674

Closed
liuzhenrain opened this issue May 20, 2017 · 6 comments

Comments

@liuzhenrain
Copy link

Expected behavior (预期行为)

预期
预想能够正常渲染

Actual behavior (实际行为)

预期
结果,在danger和info之间所有的 Markdown 语法均不能正常渲染

Steps to reproduce the behavior (重现步骤)

使用两个完整输入的{% note info %} {% endnote %} (任意tag都一样,不一定为info) 之间添加的任何 Markdown 语法均无法正常的渲染。

NexT Information

Add the ✔ sign before an item which is affected by this behavior.

NexT Version:

  • Master
  • Latest Release
  • Old version -

NexT Scheme:

  • All schemes
  • Muse
  • Mist
  • Pisces

Other Information (Like Browser, System, Screenshots)

@liuzhenrain
Copy link
Author

如果在两个{% note info %}{% endnote %}之间插入 {% note label %}{% endnote %},或者 {% codeblock %}{% endcodeblock %} 则两个{% note info %}{% endnote %}之间的Markdown语法能够正常渲染。
但很明显这不是我们想要的结果。
image
结果:
image

@zhuzhuyule
Copy link
Contributor

zhuzhuyule commented May 25, 2017

这个是 定义{% node%}...{% endnode%} 标签导致的,我查看了 这里, 本行内 content 内容到下一个标签才会结束,感觉是bug,


我的解决方案:重写 node 标签 避开这个bug
代码:https://github.com/zhuzhuyule/useful-code/tree/master/src/hexo-tags
其中:
label.js path:(hexoRoot)\themes\next\scripts\tags\label.js
lable.swig path:(hexoRoot)\themes\next\source\css_custom\label.styl

使用:

{% lb info, 这就是个提示 %} 

不会影响markdown解析了,效果看 这里

特别提示: 在引用结束后,必须添加字符,不然 所有标签都会 解析不了的。我这里使用  ,也可以用 全角空格

```
这里是引用
```

 {% lb info, 前边有个字符 %} ,不然`引用`结束不了的。

或者有更好的方案提示我。

@ivan-nginx
Copy link
Collaborator

ivan-nginx commented May 26, 2017

@liuzhenrain what's the question? I don't understand.


Ok, i see. You read documentation how to use note tag? No need to write this in 1 line, like that:

{% note danger %}note danger, note danger, note danger{% endnote %}

Need to write it like u may see in note documentation link (#1160), like this:

{% note danger %}
note danger, note danger, note danger
{% endnote %}

Close it if problem solved.

@ivan-nginx
Copy link
Collaborator

@liuzhenrain if issue resolved, close it please.

@liuzhenrain
Copy link
Author

@zhuzhuyule 如果使用超过一个note 标签,那么必须要使用如下的方式才能正常使用

{% note danger %}
note danger, note danger, note danger
note danger, note danger, note danger
note danger, note danger, note danger
{% endnote %}

@stevenjoezhang
Copy link
Contributor

Fixed in hexojs/hexo#4161

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