dart-lang / markdown

A Dart markdown library
https://pub.dev/packages/markdown
BSD 3-Clause "New" or "Revised" License
440 stars 200 forks source link

Line breaks are ignored #615

Open sundar-karpura opened 3 weeks ago

sundar-karpura commented 3 weeks ago

For the issue reported in markdown_quill, the fix may be in this repo. Could you please investigate this? The fix may be in EmptyBlockSyntax.

      @override
      Node? parse(BlockParser parser) {
        parser.encounteredBlankLine = true;
        parser.advance();

        // Don't actually emit anything.
        // return null;
        return Element('br', null);  // this change seems to work for my use case, but I have not tested fully.
      }
srawlins commented 3 weeks ago

Thanks for filing an issue, can you please explain here what the issue is which you have encountered, including the steps to reproduce, the expected output, and the actual output?

sundar-karpura commented 3 weeks ago

Thanks for filing an issue, can you please explain here what the issue is which you have encountered, including the steps to reproduce, the expected output, and the actual output?

Please check the following associated issue, which includes example for reproducing the issue: https://github.com/TarekkMA/markdown_quill/issues/20

srawlins commented 3 weeks ago

Sorry, the summary of that issue doesn't really spell out the issue either. I can't read the whole thread to try and tease out what the issue might be with the markdown package.