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(snippet.js): corner cases of Snippet Lines #85

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

Tiphereth-A
Copy link
Member

@Tiphereth-A Tiphereth-A commented Dec 2, 2024

fix #83 (comment) and #83 (comment)

提供了 https://facelessuser.github.io/pymdown-extensions/extensions/snippets/#snippet-lines 中提到的

  • To specify extraction of content to start at a specific line number, simply use file.md:3.
  • To extract all content up to a specific line, use file.md::3. This will extract lines 1 - 3.

的支持

@Enter-tainer Enter-tainer merged commit 4527343 into OI-wiki:master Dec 2, 2024
2 checks passed
@Tiphereth-A Tiphereth-A deleted the fix-snippet branch December 2, 2024 11:00
@c-forrest
Copy link
Contributor

c-forrest commented Dec 2, 2024

fix #83 (comment) and #83 (comment)

提供了 https://facelessuser.github.io/pymdown-extensions/extensions/snippets/#snippet-lines 中提到的

  • To specify extraction of content to start at a specific line number, simply use file.md:3.
  • To extract all content up to a specific line, use file.md::3. This will extract lines 1 - 3.

的支持

原本不打算支持这种写法的,所以就没加。毕竟剪切语法 "--8<--" 也是硬编码进去的。

看了您的代码更新,是不是还是没处理 "a.cpp:3" 这种情况:

噢,我犯蠢了。没事了。

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.

3 participants