qwerty287
|
dec9c1e224
|
Improve md rendering (#1008)
* the first commits close https://codeberg.org/gitnex/GitNex/issues/925
* instead of using `TextView`s, it now uses `RecyclerView`s as they are supported by `Markwon` too and especially tables look better
* see https://noties.io/Markwon/docs/v4/recycler/ and https://noties.io/Markwon/docs/v4/recycler-table/
* I replaced the `TextView`s on issue descriptions, comments, file viewer and the README viewer with a `RecyclerView`
* the second parts close https://codeberg.org/gitnex/GitNex/issues/993
* images are now displayed if content is rendered using a `RecyclerView`
* it seems that there is an issue with the `PicassoImagesPlugin` with `TextView`s, with `RecyclerView`s it's working
* the third parts render issue/PR links like #1 as links, that closes https://codeberg.org/gitnex/GitNex/issues/72
* therefore, I added an URL prefix to the deep links named `gitnex` so that it is possible to open links from any instance by using `gitnex` instead of `http`/`https`
* Full links are rendered as #index too
* code is mostly from the sample app (https://github.com/noties/Markwon/blob/master/app-sample/src/main/java/io/noties/markwon/app/samples/GithubUserIssueInlineParsingSample.java#L60-L110)
* I undid https://codeberg.org/gitnex/GitNex/pulls/995 because it wouldn't work if you have code block (starting/ending with ```) with newlines in it, I found another solution (see [the issue on gh](https://github.com/noties/Markwon/issues/168#issuecomment-622943057) and ef9bdbfb90 )
* in the next commits (dd99f435ee...2021a71951 ), I fixed and improved various things
* commit links are only rendered as short SHA
* supports relative attachment links (addresses #993)
* don't render email addresses as user mentions
However, one thing isn't working right now:
* the `LinkifyPlugin` is not working with `RecyclerView`s right now
* I would like to change the way how the links are rendered and to open the activities directly instead of opening the deeplinkactivity
close https://codeberg.org/gitnex/GitNex/issues/925 close https://codeberg.org/gitnex/GitNex/issues/993 close https://codeberg.org/gitnex/GitNex/issues/72
Co-authored-by: qwerty287 <ndev@web.de>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1008
Reviewed-by: 6543 <6543@noreply.codeberg.org>
Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org>
Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
|
2021-12-15 23:39:04 +01:00 |