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: ordered-list prefix, add Math to inline structures, code block parse #25

Merged
merged 5 commits into from
Dec 28, 2023

Conversation

obgnail
Copy link
Contributor

@obgnail obgnail commented Dec 27, 2023

No description provided.

@obgnail
Copy link
Contributor Author

obgnail commented Dec 27, 2023

开发者你好。修复三个问题:

fix ordered-list-item isValidPrefix

问题:

有序列表的判断有误。

fix parse: reset blockCodeDelimiter at BlockCode

问题:

parse中的FrontMatter处理逻辑会设置 blockCodeDelimiter,而 BlockCode 没有,导致 blockCodeDelimiter 有误

    else if (c3 === '```' && allow(NodeKind.BlockCode)) {
      push(State.BlockCodeLang)
      i += 3
    }
    else if (c3 === '---' && allowFrontMatter()) {
      push(State.BlockCodeLang)
      blockCodeDelimiter = c3
      i += 3
    }

复现文本:

---
test:1
---

```js
console.log(1)
```

fix node-kind: add Math into Inline

问题:

Math 支持 inline 模式,但是没有加入到 inline 变量中

复现文本:

- 前$Latex$后

@obgnail obgnail changed the title Dev fix three BUG Dec 27, 2023
Copy link
Owner

@harttle harttle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感谢一起改这个东西,我来帮忙修流水线和发布

src/nodes/ordered-list-item.ts Show resolved Hide resolved
src/parser/parse.ts Show resolved Hide resolved
@harttle harttle changed the title fix three BUG fix: ordered-list prefix, add Math to inline structures, code block parse Dec 27, 2023
@obgnail
Copy link
Contributor Author

obgnail commented Dec 27, 2023

@harttle 开发者你好,已经加了 testcase。您看一下。

'when there is front matter, the delimiter of the code block should be ``` instead of ---' 这个 testcase 会比较奇怪,因为此时 bug 的情况是 ``` 会被修改成 ---

isBlank 的修改可能需要交还给您处理了,我看了下代码,quote,ordered list,unordered list 使用的都是 " ",需要统一修改。

@harttle harttle merged commit ef7694c into harttle:master Dec 28, 2023
1 check passed
github-actions bot pushed a commit that referenced this pull request Dec 28, 2023
## [1.2.1](v1.2.0...v1.2.1) (2023-12-28)

### Bug Fixes

* allow \t as separater ([c8f31f6](c8f31f6))
* ordered-list prefix, add Math to inline structures, code block parse ([#25](#25)) ([ef7694c](ef7694c))
Copy link

🎉 This PR is included in version 1.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@harttle
Copy link
Owner

harttle commented Dec 28, 2023

vscode extension published: harttle/md-padding-vscode@c7fcf6e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants