noties / Markwon

Android markdown library (no WebView)
https://noties.io/Markwon/
Apache License 2.0
2.74k stars 309 forks source link

compact codeblocks (empty lines) #362

Open markushub opened 3 years ago

markushub commented 3 years ago
  1. Please specify expected/actual behavior

    actual behavior

    Creating and watching notes with sourcecode blocks takes vertical space for empty lines.

Currently an additional empty line is necessary before a codeblock (only in edit mode)

e.g.

## Listing1 with empty line

```
#! /bin/bash
echo "codeblock"
```

expected behavior

## Listing2 without empty line should also be a codeblock
```
#! /bin/bash
echo "codeblock"
```

And in preview mode maybe the vertical space could be reduced less then a complete empty line.

Maybe it's just an parsing issue.

  1. Please specify conditions/steps to reproduce (layout, code, markdown used, etc)

I use markwon indirect with Nextcloud-Notes https://github.com/stefan-niedermann/nextcloud-notes/issues/1296

create Listing1 it parse OK create Listing2 it is not recognized as sourcecode

noties commented 3 years ago

Hello @markushub ,

thank you for the effort to create this issue. Unfortunately I'm afraid I won't be able to help you as I'm not aware of the context in which this library is used by the nextcloud-notes application. I'm not familiar with its code and have very little idea how it uses Markwon