Giter Club home page Giter Club logo

Comments (18)

dianso avatar dianso commented on July 19, 2024 1

竖线111竖线111竖线 竖线:------:竖线:------:竖线
就是标准语法

试试这样的语法 @dianso

Style | Preveiw
--------|------
Dark | test1
Light | test2

展示结果如下:

Style Preveiw
Dark test1
Light test2

也不行

from markdown-blog.

dianso avatar dianso commented on July 19, 2024 1

竖线111竖线111竖线 竖线:------:竖线:------:竖线
就是标准语法

试试这样的语法 @dianso

Style | Preveiw
--------|------
Dark | test1
Light | test2

展示结果如下:
Style Preveiw
Dark test1
Light test2

也不行

那就奇怪了啊,我们的都没问题,不过我没测试过win的程序,理论上都是用的一套md解析语法应可以的啊

找到原因了,是换行符号问题,看了下你的代码,用的库不支持标准MD换行语法,就是行末增加2个空格然后回车。
而是直接按回车就能换行,但是换行符只支持unix(lf),不支持windows(crlf)的。
我用了unix换行后,WIN11和NAS里面的docker版本都能完美换行,表格也能解析了。
我平时多在win11平台,所以只能用notepadnext这类编辑器强行把换行符转换成unix形式的,如果解析器能自动将windows的转换成unix的就好了。

厉害啊👍

我也会跟进下三方扩展的更新,看看会不会支持~

russross/blackfriday#428

好几年前就有人说过这个问题,也有修复方案,不过没有得到重视。

russross/blackfriday#423

这里有个方法,就是:

带有 Windows 行尾 (CLRF) 的文本。我目前的解决方法是在将它们传递给 blackfriday 之前替换它们:

markdownWithUnixLineEndings := strings.Replace(markdown, "\r\n", "\n", -1)
blackfriday.Run([]byte(markdownWithUnixLineEndings))

gwd/session-scheduler@904bb13

https://github.com/go-gitea/gitea/blob/dc8036dcc680abab52b342d18181a5ee42f40318/modules/util/util.go#L68-L102

按照这个修改下也行。

from markdown-blog.

dianso avatar dianso commented on July 19, 2024

[DBUG] 2023/03/04 22:17 Log level set to "debug"
[DBUG] 2023/03/04 22:17 Using <cache/logs/access-20230304.log> to log requests
[ERRO] 2023/03/04 22:17 favicon: file or directory D:\markdown-blog\favicon.ico not found: %!w(*fs.PathError=&{open D:\markdown-blog\favicon.ico 2})
[DBUG] 2023/03/04 22:17 Application: view engine "HTML" is registered
[DBUG] 2023/03/04 22:17 API: 7 registered routes (3 GET, 2 HEAD and 2 ERROR)
GET: /static file server (github.com/gaowei-space/markdown-blog/internal/app/app.go:84)
• github.com/gaowei-space/markdown-blog/internal/app.RunWeb (github.com/gaowei-space/markdown-blog/internal/app/app.go:60)
GET: /static/{file:path} file server (github.com/gaowei-space/markdown-blog/internal/app/app.go:84)
• github.com/gaowei-space/markdown-blog/internal/app.RunWeb (github.com/gaowei-space/markdown-blog/internal/app/app.go:60)
GET: /{f:path} (github.com/gaowei-space/markdown-blog/internal/app/app.go:85)
• github.com/gaowei-space/markdown-blog/internal/app.RunWeb (github.com/gaowei-space/markdown-blog/internal/app/app.go:60)
• iris.cache (:1)
• github.com/gaowei-space/markdown-blog/internal/app.articleHandler (github.com/gaowei-space/markdown-blog/internal/app/app.go:203)

HEAD: /static (github.com/gaowei-space/markdown-blog/internal/app/app.go:84)
• github.com/gaowei-space/markdown-blog/internal/app.RunWeb (github.com/gaowei-space/markdown-blog/internal/app/app.go:60)
HEAD: /static/{file:path} (github.com/gaowei-space/markdown-blog/internal/app/app.go:84)
• github.com/gaowei-space/markdown-blog/internal/app.RunWeb (github.com/gaowei-space/markdown-blog/internal/app/app.go:60)

404: / (github.com/gaowei-space/markdown-blog/internal/app/app.go:52)
• github.com/gaowei-space/markdown-blog/internal/api.NotFound (github.com/gaowei-space/markdown-blog/internal/api/ErrorResponse.go:5)
500: / (github.com/gaowei-space/markdown-blog/internal/app/app.go:53)
• github.com/gaowei-space/markdown-blog/internal/api.InternalServerError (github.com/gaowei-space/markdown-blog/internal/api/ErrorResponse.go:9)

from markdown-blog.

dianso avatar dianso commented on July 19, 2024

部分渲染成功了,部分不成功,表格也没渲染

from markdown-blog.

gaowei-space avatar gaowei-space commented on July 19, 2024

可以提供无法渲染的mardown内容么?

from markdown-blog.

dianso avatar dianso commented on July 19, 2024

可以提供无法渲染的mardown内容么?

你好作者,我测试了下,发现表格不渲染,其他的都可以。

还有就是换行问题,md文件里换行了,网页显示都在一行

from markdown-blog.

dianso avatar dianso commented on July 19, 2024

可以提供无法渲染的mardown内容么?

正常一段话后面加2个空格回车后就可以换行了,不知道我为什么一直没成功

from markdown-blog.

gaowei-space avatar gaowei-space commented on July 19, 2024

可以提供无法渲染的mardown内容么?

正常一段话后面加2个空格回车后就可以换行了,不知道我为什么一直没成功

这个确实是有兼容问题,我记录下

from markdown-blog.

gaowei-space avatar gaowei-space commented on July 19, 2024

可以提供无法渲染的mardown内容么?

你好作者,我测试了下,发现表格不渲染,其他的都可以。

还有就是换行问题,md文件里换行了,网页显示都在一行

表格问题,我这边测试是没问题的,而且在我的博客中也有表格的使用。

如果可以的话,贴一下你表格语法看看

from markdown-blog.

dianso avatar dianso commented on July 19, 2024

可以提供无法渲染的mardown内容么?

你好作者,我测试了下,发现表格不渲染,其他的都可以。
还有就是换行问题,md文件里换行了,网页显示都在一行

表格问题,我这边测试是没问题的,而且在我的博客中也有表格的使用。

如果可以的话,贴一下你表格语法看看

比如这个

啊啊
1111111 11111111111

from markdown-blog.

dianso avatar dianso commented on July 19, 2024

竖线111竖线111竖线
竖线:------:竖线:------:竖线

就是标准语法

from markdown-blog.

gaowei-space avatar gaowei-space commented on July 19, 2024

竖线111竖线111竖线 竖线:------:竖线:------:竖线

就是标准语法

试试这样的语法 @dianso

Style | Preveiw
--------|------
Dark | test1
Light | test2

展示结果如下:

Style Preveiw
Dark test1
Light test2

from markdown-blog.

gaowei-space avatar gaowei-space commented on July 19, 2024

竖线111竖线111竖线 竖线:------:竖线:------:竖线
就是标准语法

试试这样的语法 @dianso

Style | Preveiw
--------|------
Dark | test1
Light | test2

展示结果如下:
Style Preveiw
Dark test1
Light test2

也不行

那就奇怪了啊,我们的都没问题,不过我没测试过win的程序,理论上都是用的一套md解析语法应可以的啊

from markdown-blog.

dianso avatar dianso commented on July 19, 2024

竖线111竖线111竖线 竖线:------:竖线:------:竖线
就是标准语法

试试这样的语法 @dianso

Style | Preveiw
--------|------
Dark | test1
Light | test2

展示结果如下:
Style Preveiw
Dark test1
Light test2

也不行

那就奇怪了啊,我们的都没问题,不过我没测试过win的程序,理论上都是用的一套md解析语法应可以的啊

我估计是换行问题,看源代码

Style|Preveiw --------|------ 123|123

并没有解析

from markdown-blog.

dianso avatar dianso commented on July 19, 2024

竖线111竖线111竖线 竖线:------:竖线:------:竖线
就是标准语法

试试这样的语法 @dianso

Style | Preveiw
--------|------
Dark | test1
Light | test2

展示结果如下:
Style Preveiw
Dark test1
Light test2

也不行

那就奇怪了啊,我们的都没问题,不过我没测试过win的程序,理论上都是用的一套md解析语法应可以的啊

找到原因了,是换行符号问题,看了下你的代码,用的库不支持标准MD换行语法,就是行末增加2个空格然后回车。

而是直接按回车就能换行,但是换行符只支持unix(lf),不支持windows(crlf)的。

我用了unix换行后,WIN11和NAS里面的docker版本都能完美换行,表格也能解析了。

我平时多在win11平台,所以只能用notepadnext这类编辑器强行把换行符转换成unix形式的,如果解析器能自动将windows的转换成unix的就好了。

from markdown-blog.

gaowei-space avatar gaowei-space commented on July 19, 2024

竖线111竖线111竖线 竖线:------:竖线:------:竖线
就是标准语法

试试这样的语法 @dianso

Style | Preveiw
--------|------
Dark | test1
Light | test2

展示结果如下:
Style Preveiw
Dark test1
Light test2

也不行

那就奇怪了啊,我们的都没问题,不过我没测试过win的程序,理论上都是用的一套md解析语法应可以的啊

找到原因了,是换行符号问题,看了下你的代码,用的库不支持标准MD换行语法,就是行末增加2个空格然后回车。

而是直接按回车就能换行,但是换行符只支持unix(lf),不支持windows(crlf)的。

我用了unix换行后,WIN11和NAS里面的docker版本都能完美换行,表格也能解析了。

我平时多在win11平台,所以只能用notepadnext这类编辑器强行把换行符转换成unix形式的,如果解析器能自动将windows的转换成unix的就好了。

厉害啊👍

我也会跟进下三方扩展的更新,看看会不会支持~

from markdown-blog.

Vanisper avatar Vanisper commented on July 19, 2024

竖线111竖线111竖线 竖线:------:竖线:------:竖线
就是标准语法

试试这样的语法 @dianso

Style | Preveiw
--------|------
Dark | test1
Light | test2

展示结果如下:
Style Preveiw
Dark test1
Light test2

也不行

那就奇怪了啊,我们的都没问题,不过我没测试过win的程序,理论上都是用的一套md解析语法应可以的啊

找到原因了,是换行符号问题,看了下你的代码,用的库不支持标准MD换行语法,就是行末增加2个空格然后回车。
而是直接按回车就能换行,但是换行符只支持unix(lf),不支持windows(crlf)的。
我用了unix换行后,WIN11和NAS里面的docker版本都能完美换行,表格也能解析了。
我平时多在win11平台,所以只能用notepadnext这类编辑器强行把换行符转换成unix形式的,如果解析器能自动将windows的转换成unix的就好了。

厉害啊👍

我也会跟进下三方扩展的更新,看看会不会支持~

大佬!
关于这个问题我晚上给您发了两个邮件 请你查收一下 就是您GitHub主页上的那个邮箱
我提了一个修复方案,我现在才看到这里原来有issues
请你看一下邮箱

from markdown-blog.

gaowei-space avatar gaowei-space commented on July 19, 2024

竖线111竖线111竖线 竖线:------:竖线:------:竖线
就是标准语法

试试这样的语法 @dianso

Style | Preveiw
--------|------
Dark | test1
Light | test2

展示结果如下:
Style Preveiw
Dark test1
Light test2

也不行

那就奇怪了啊,我们的都没问题,不过我没测试过win的程序,理论上都是用的一套md解析语法应可以的啊

找到原因了,是换行符号问题,看了下你的代码,用的库不支持标准MD换行语法,就是行末增加2个空格然后回车。
而是直接按回车就能换行,但是换行符只支持unix(lf),不支持windows(crlf)的。
我用了unix换行后,WIN11和NAS里面的docker版本都能完美换行,表格也能解析了。
我平时多在win11平台,所以只能用notepadnext这类编辑器强行把换行符转换成unix形式的,如果解析器能自动将windows的转换成unix的就好了。

厉害啊👍
我也会跟进下三方扩展的更新,看看会不会支持~

大佬! 关于这个问题我晚上给您发了两个邮件 请你查收一下 就是您GitHub主页上的那个邮箱 我提了一个修复方案,我现在才看到这里原来有issues 请你看一下邮箱

好的

from markdown-blog.

Related Issues (20)

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.