yuin / goldmark

:trophy: A markdown parser written in Go. Easy to extend, standard(CommonMark) compliant, well structured.
MIT License
3.68k stars 255 forks source link

disbale CodeBlockParser but cont get empty result #433

Closed zhangziang closed 9 months ago

zhangziang commented 11 months ago

goldmark has https://github.com/yuin/goldmark/discussions in github. You should post only issues here. Feature requests and questions should be posted at discussions.

Please answer the following before submitting your issue:

  1. What version of goldmark are you using? : v 1.6.0
  2. What version of Go are you using? : v 1.21.4
  3. What operating system and processor architecture are you using? : macOS 10.14
  4. What did you do? : parse text with some \t beginning and dont use CodeBlockParser

    
    test message
    
    one line with \t beginning
    two line with \t beginning

eof


8. What did you expect to see? :
prase result contain text  node, content is `    one line with \t beginning` or `    two line with \t beginning`
10. What did you see instead? :
prase result miss `    one line with \t beginning` and `    two line with \t beginning`
12. Did you confirm your output is different from [CommonMark online demo](https://spec.commonmark.org/dingus/) or other official renderer correspond with an extension?:
maybe
yuin commented 11 months ago

This issue is hard to make a decision that consists with CommonMark spec.

As defined in CommonMark spec, Block elements except indented code block elements can not accept indented lines. One of the options for this issue is add your own parser which returns true for CanAcceptIndentedLine() bool. Other options for this issue is add a functional option that makes Paragraphs indentable.

github-actions[bot] commented 9 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 9 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.