asjqkkkk / markdown_widget

📖Rendering markdown by flutter!Welcome for pr and issue.
MIT License
321 stars 93 forks source link

请问如何调整段落p和标题h之间的距离,而不影响段落内部的行间距,和标题内部的行间距? #148

Open DeveloperLx opened 9 months ago

DeveloperLx commented 9 months ago

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

asjqkkkk commented 9 months ago

@DeveloperLx 你好,这个问题应该可以转换成“如何调整标题的marginBottom”?因为你无法确定h的下一个element一定是p,它也可能是img,或者各种其他的element 而如果是调整h的margin,那你需要去自定义HeadingNode+SpanNodeGenerator或结合HeadingConfig来实现这一效果