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

请问如何添加空行,已经试过连续的\n\n是不行的 #149

Open
DeveloperLx opened this issue Dec 28, 2023 · 10 comments
Open

请问如何添加空行,已经试过连续的\n\n是不行的 #149

DeveloperLx opened this issue Dec 28, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@DeveloperLx
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment(please complete the following information):
Please use flutter doctor -v to show your flutter environment, and add your markdown_widget version too

Platform
Does the problem appear on the Web or on the Mobile

Source data
Please provide a minimal source data that can help locating the problem

@DeveloperLx DeveloperLx added the bug Something isn't working label Dec 28, 2023
@asjqkkkk
Copy link
Owner

@DeveloperLx 你好,连续的\n被trim掉了,如果你需要实现这一效果的话,可能要自定义MarkdownGenerator对象,去解析markdown文件

目前github也是不支持连续\n的,你可以试一试下面这样

aaa






aaa

aaa

aaa

@lucasjinreal
Copy link

@asjqkkkk 意思是要这样写吗: \n \n \n?

@asjqkkkk
Copy link
Owner

asjqkkkk commented Jan 8, 2024

@lucasjinreal 你好,只要是 \n,无论什么样的写法,最终都是会被trim掉的,所以可以参考我上面的做法:
自定义MarkdownGenerator对象,去解析markdown文件

@lucasjinreal
Copy link

@asjqkkkk 可以给个例子吗,目前这个是刚需,因为LLM输出的\n有一些是必须展示的

@asjqkkkk
Copy link
Owner

@lucasjinreal 你好,个人时间有限,没有多余的精力为每个自定义需求的issue去编写示例,如果真的有这样的需求,还是建议阅读对应的代码,然后尝试去实现对应功能

#150 也是如此,不再赘述

@OpenJarvisAI
Copy link

@asjqkkkk 作者您好,现在不hack这个库,直接支持的多行的办法没有了吗?所有的\n看起来都会忽略

@asjqkkkk
Copy link
Owner

@asjqkkkk 作者您好,现在不hack这个库,直接支持的多行的办法没有了吗?所有的\n看起来都会忽略

或许等下个版本我尝试添加方法来实现这个功能

@lucasjinreal
Copy link

@asjqkkkk I am also hoping for it now, it's ommit default by github, but might needed by others since messages in markdown without \n looks like messy

@DeveloperLx
Copy link
Author

建议建议提供一个开关,来控制是否trim连续的\n

@lucasjinreal
Copy link

It could be better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants