Giter Site home page Giter Site logo

代码块缩进消失 about gittoc HOT 8 CLOSED

holy-shine avatar holy-shine commented on September 23, 2024
代码块缩进消失

from gittoc.

Comments (8)

Holy-Shine avatar Holy-Shine commented on September 23, 2024 1

@JiaHeng-DLUT 确实是代码逻辑的问题,已经在最新的版本里修复了。have a try 😄

from gittoc.

Holy-Shine avatar Holy-Shine commented on September 23, 2024

@JiaHeng-DLUT Hi~能给我看下消失的代码块的markdown源码吗😄

from gittoc.

JiaHeng-DLUT avatar JiaHeng-DLUT commented on September 23, 2024
## Test1

```c++
#include <iostream>
using namespace std;

int main() {
    cout << "md" << endl;
    return 0;
}
``\`

去掉最后的 \

from gittoc.

Holy-Shine avatar Holy-Shine commented on September 23, 2024

@JiaHeng-DLUT ok.因为这个脚本是检测“#”的,如果代码块里有#,需要把它放到''' '''包起来的代码块里面,所以你的代码块需要改成
'''c++
## test1
...
...
'''

from gittoc.

JiaHeng-DLUT avatar JiaHeng-DLUT commented on September 23, 2024

但是 GitHub Flavored Markdown 并不支持 '''...''' 代码块呀

from gittoc.

Holy-Shine avatar Holy-Shine commented on September 23, 2024

@JiaHeng-DLUT 抱歉打错了,代码块是 ``` ```标准markdown语法的

from gittoc.

JiaHeng-DLUT avatar JiaHeng-DLUT commented on September 23, 2024

@Holy-Shine 抱歉,我没理解要怎么改。我又测试了一下,发现只有一级标题下的代码块转换之后缩进正常,二三四级标题下的代码块的缩进都消失了。

原文档:
image

转换之后:
image

Markdown 源码如下:

test.txt

from gittoc.

JiaHeng-DLUT avatar JiaHeng-DLUT commented on September 23, 2024

刚刚测试了一下,确实已经修复了呢,点赞👍

from gittoc.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.