hexojs / hexo-renderer-markdown-it

Markdown-it is a Markdown parser, done right. A faster and CommonMark compliant alternative for Hexo.
MIT License
341 stars 60 forks source link

Not support Unordered list #167

Closed zhangqinzhong closed 2 years ago

zhangqinzhong commented 2 years ago

我想要的效果如下: image

实际的效果: image

tomap commented 2 years ago

Can you provide your source markdown?

zhangqinzhong commented 2 years ago

This is my source markdown.as follows:

##### java 反射构建对象的方式。

1. Class.forName("完全限定名");
2. 对象.getClass();
3. 类.class;

> Constructor ctor = clazz.getDeclareConstructor();
> Object obj = ctor.getNewInstance();

BeanDefinition 表示bean定义

Spring根据 BeanDefinition来创建Bean对象, BeanDefinition有很多的属性用来描述Bean

BeanDefinition中的属性:

* beanClass 表示一个bean的类型,比如OrderService.class,UserService.class,spring在创建bean的时候会根据此属性实例化得到对象。
* scope 表示一个bean的作用域,比如: scope:等于 singleton,该bean就是一个单例Bean; sope等于 prototype,该bean就是一个原型bean
* isLazy 表示一个bean是不是需要懒加載,原型bean的 isLazy属性不起作用, 懒加载的单例bean,会在第一次 getBean的时候生成该bean,非懒加载的单例bean,则会在 Spring启动过程中直接生成好。
* dependsOn 表示一个bean在创建之前依赖的其他bean,在一个bean创建之前,依赖的其他bean都要创建好。
* primary 表示一个bean是主bean,在spring中一个类型可以有多个bean对象,在进行依赖注入时,如果根据类型找到了多个bean,此时会判断是否存在一个主bean,如果存在,则直接将主bean注入给属性。
* initMethodName 表示一个bean的初始化方法,一个bean的声明周期过程中有一个步骤叫初始化,Spring会在这个步骤中去调用bean的初始化方法,初始化方法的逻辑由程序员自己控制,表示程序员可以自定义逻辑对bean进行加工。

@Component,@Bean,XML的bean标签。这些都会解析为BeanDefinition
tomap commented 2 years ago

I just tested here, and your example seems to work fine: https://markdown-it.github.io/

It seems you can use both "*" and "-" for unordered lists.

Note that it won't work inside a code bloc

tomap commented 2 years ago

Specs https://spec.commonmark.org/0.30/#list-items

zhangqinzhong commented 2 years ago

image

Is this the right effect? But it's not what I want. But thank you for your patience

tomap commented 2 years ago

Screenshot_20211230-122207 Their default example seems to work fine on my browser. Could you tell me which browser you are using? Could you check the generated html?

zhangqinzhong commented 2 years ago

Found the problem. It was caused by a Google plug-in. 养基宝.Google plug-ins affect all web pages.Thank you very much for your help.