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

[Feature Request] 增加 include 后编译 Markdown 标记 #393

Closed
3 tasks done
Huffer342-WSH opened this issue May 18, 2024 · 6 comments · Fixed by #394
Closed
3 tasks done

[Feature Request] 增加 include 后编译 Markdown 标记 #393

Huffer342-WSH opened this issue May 18, 2024 · 6 comments · Fixed by #394
Labels
enhancement New feature or request

Comments

@Huffer342-WSH
Copy link

Describe the bug

<!--@include: ./arrival-vector.md{8,}-->包含文件后,包含进来的文件没有格式

markdown文件如下
image

网页效果如下
image

Reproduction

none

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (16) x64 Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz
    Memory: 3.47 GB / 15.71 GB
  Binaries:
    Node: 20.12.0 - E:\Program_Files\node-v20.12.0-win-x64\node.EXE
    npm: 10.5.0 - E:\Program_Files\node-v20.12.0-win-x64\npm.CMD   
    pnpm: 9.1.1 - E:\Program_Files\node-v20.12.0-win-x64\pnpm.CMD  
  Browsers:
    Edge: Chromium (124.0.2478.105)
    Internet Explorer: 11.0.19041.3636

Used Package Manager

pnpm

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
@YunYouJun
Copy link
Owner

这里有个问题,也有就是想要 include 原始文本作为示例的需求。

如何区分用户想要原始文本还是编译的文本需要具体讨论下 @KazariEX

我参考的是 VitePress,我发现它是只支持原始文本。

@KazariEX
Copy link
Contributor

KazariEX commented May 26, 2024

可以加一个关键字作区分,比如 import / includeRaw 之类的,或者像 vite import 一样加一个 ?raw

@YunYouJun
Copy link
Owner

include 可以先和 vitepress 保持一致。可以为编译后的内容添加新的关键字或标记。

How about @include-compiled?

@YunYouJun YunYouJun changed the title 包含 MarkDown 文件的功能不正常 [Feature Request] 增加 include 后编译 Markdown 标记 May 29, 2024
@YunYouJun YunYouJun added the enhancement New feature or request label May 29, 2024
@KazariEX
Copy link
Contributor

没问题,就是觉得 @include 效果和预期不太一致。无论从 vitepress 文档的描述还是示例来看,都更容易让人认为包含的字符串应该是会被当做 Markdown 来处理的,否则 “包含 markdown 文件” 这个标题就很奇怪了,因为包含任何文本文件的效果都是一样的

@KazariEX
Copy link
Contributor

我刚刚试了试 vitepress,它是会编译的呀(

@YunYouJun
Copy link
Owner

也许是我记错了。

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

Successfully merging a pull request may close this issue.

3 participants