App Version: 1.9.2
OS Version: 23
Model: samsung-SM-G800F
Numeric lists in issue comments aren't aligned properly. It looks like this:

Or:
Hi, thanks for reporting, 1.9.2 isn't finished yet lol. I just wanted to bring it back to playstore,
P.S: 1.9.4 is up already in playstore do update to avoid a bug fixed
@k0shk0sh I'm glad you managed to solve the copyright problems! The alignment was already wrong in 1.9.1 by the way, but in 1.9.2 it got even worse. (and 1.9.4 didn't change it)
@StanNL me too, I'm glad :D .
If it was in 1.9.1 unaligned properly, could you confirm that in Github website it is aligned?
1.9.4 was pushed due to fact that I forgot to remove the splash screen icon and make an update immediately, so I don't​ get banned lol
@k0shk0sh It does work on the browser and it also works on my tablet, which is strange.
Edit: but on my phone the bullet lists also don't work. However, I recently switched to Android 6.0 after coming from 7.1, so that may be a cause.
Edit 2: Are you supposed to get notifications when new mentions have arrived? I also am unable to see them in the notification screen in this app.
Edit 3: This is what I was talking about 
Well, if no notifications are received or displayed up there, then simply github didn't return any notifications. https://developer.github.com/v3/activity/notifications/#list-your-notifications default to all
Could you please point me to that issue or comment that has that list.
@k0shk0sh Oh of course! That explanation makes sense and I'll try it out in a second by sending an http request. Edit: you're right, GitHub literally returns nothing at all, not just an empty array or something. Maybe I disabled it somewhere. Edit 2: Yup I disabled it, but not anymore.
Here's the link: https://github.com/Spookcity/ROMS-G800F/issues/13
@StanNL glad you solved it and I hope you like the new notification screen.
@k0shk0sh Yeah it's great!
I just looked into the issue link you provided, strangely, only that particular list is messed up, the rest in the issue are fine :D
@k0shk0sh Yeah but that's because they're not using the correct GitHub syntax, but just regular numbers.
but looking at the response, github actually parsed it as ol as you can see below:
<p>To get this discussion started, I was wondering:</p>\n
<ol>\n
<li>Which email app are you guys using?</li>\n
<li>What music app would you recommend?</li>\n
<li>How long is your SoT on average?</li>\n
<li>Which ROM are you using and why?</li>\n
<li>Are you using a GitHub app and if so, which one?</li>\n</ol>\n
<p><strong>My preferences</strong></p>\n
<ol>\n
<li>Inbox by Gmail</li>\n
<li>Phonograph</li>\n
<li>I'd say about 4.5 hours</li>\n
<li>XOSP, because it's extremely fluid, especially with L Speed</li>\n
<li>FastHub</li>\n</ol>
so now i'm abit confused lol
@k0shk0sh But isn't that the way you want it to be? It seems like valid HTML code.
@StanNL yup & for that reason I'm confused on why it doesn't but the rest do!
@k0shk0sh Well, the others don't use the default GitHub markup. They just do:
1.text
2.text
3.text
While I know that there has to be a space between the period and the text, like this:
The problem with the first list, is that GitHub doesn't understand that it is a list, so it just parses it as "1.text \n 2.text \n 3.text". However, it _does_ understand that my list, actually is a list. Therefore, it does parse it correctly. However, there is something wrong with the way FastHub displays ol lists. Only the first number is aligned properly.
but I could see both correct in this comment?
Really? I couldn't. I'll send you screenshots of what I see.


Yup


What is your phone's DPI?
@StanNL I'm using htc one m8
@k0shk0sh I just changed my DPI to 441 (which is HTC One M8's default DPI) and that doesn't help either.
@StanNL

😕😕


@k0shk0sh Yeah it's strange...
By the way: the message preview does work. (the eye icon)
So what's the big difference between the two?
the difference is that in preview we are parsing markdown format, while in comments & everywhere else, we are parsing html in (1.9.+) into a textView to improve the scrolling & performance of comments.
@k0shk0sh Hmm well, maybe you could make it optional in the settings? I'm sure you saved the old version somewhere.
@StanNL I don't think that this is the right approach, I'll try and fix it, before later release, if couldn't, then I'll try more.
@k0shk0sh I might have an explanation for this.
I also write an Android app for GitHub, although it is not published yet.
In order to display the markdown I use CommonMark java to convert the Markdown to HTML, and then Html.fromHtml with a TagHandler to convert this into spans.
Obviously there's a lot of overhead doing this, so I have to cache the spans when scrolling and I plan to convert the Markdown directly to a Spanned from CommonMark at some point.
Back to the issue.
On versions below N, lists work fine

Displaying this issue which contains a bunch of list HTML with list types etc.
On Android N, the list alignment is broken.
It starts off bad

And gets much worse

The only mention of this problem I have been able to find is on the Android Issue tracker.
https://issuetracker.google.com/issues/37126393
It claims that on N the priority of the spans (Which should be the order that they were inserted) is not respected.
As of November 2016 the issue has been passed to the defect team and they say they will " will update this issue with more information as it becomes available.".
Unfortunately this is not of much use.
I have two TextView classes which deal with markdown. One is a plain old TextView, and the other extends EditText and is used in the markdown editor to toggle between raw and formatted.
Strangely, the EditText didn't seem to be anywhere near as bad.

A few items in deeply nested lists were offset by 1-2 characters, but it wasn't outright broken like in the TextView.
I dug through the EditText trying to find what made the difference, and it turned out that it was just one method.
@Override
protected boolean getDefaultEditable() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.N || super.getDefaultEditable();
}
This fixed the problem on N, but obviously also made my TextView editable.
To fix this I had to change the cursor back and remove suggestions.
// In constructor
setTextIsSelectable(true);
setCursorVisible(false);
setClickable(true);
@Override
public boolean isSuggestionsEnabled() {
return false;
}
Hopefully this is helpful.
@tpb1908 thanks for the brief explanation, I'll try that out even tho I know that it's something with the htmlSpanner library I'm using, but will give this a shot and try it out.
Thanks for the heads up.
@k0shk0sh Well, the explanation wasn't very brief ;) (which means short). However, I really hope that it will solve the problems. There is still one problem remaining though: He mentioned that the problems only occurred on Android Nougat, but I'm using Marshmallow and they don't work either.
They look different, but still not ideal:

@StanNL , i'm working on that.
this issue has been fixed by not relying on spans to be drawing on each list but to append the list number before each list which this will reserve the spacing & margin between the list 🙌
Edit: it also adds back (todos)
@k0shk0sh I'm glad that you managed to fix this!
@StanNL I spent pretty time trying to fix it while it was pretty much easy to fix lol.
Most helpful comment
@k0shk0sh I might have an explanation for this.
I also write an Android app for GitHub, although it is not published yet.
In order to display the markdown I use CommonMark java to convert the Markdown to HTML, and then Html.fromHtml with a TagHandler to convert this into spans.
Obviously there's a lot of overhead doing this, so I have to cache the spans when scrolling and I plan to convert the Markdown directly to a Spanned from CommonMark at some point.
Back to the issue.
On versions below N, lists work fine
Displaying this issue which contains a bunch of list HTML with list types etc.
On Android N, the list alignment is broken.
It starts off bad

And gets much worse
The only mention of this problem I have been able to find is on the Android Issue tracker.
https://issuetracker.google.com/issues/37126393
It claims that on N the priority of the spans (Which should be the order that they were inserted) is not respected.
As of November 2016 the issue has been passed to the defect team and they say they will " will update this issue with more information as it becomes available.".
Unfortunately this is not of much use.
"Solution"
I have two
TextViewclasses which deal with markdown. One is a plain oldTextView, and the other extendsEditTextand is used in the markdown editor to toggle between raw and formatted.Strangely, the
EditTextdidn't seem to be anywhere near as bad.A few items in deeply nested lists were offset by 1-2 characters, but it wasn't outright broken like in the
TextView.I dug through the
EditTexttrying to find what made the difference, and it turned out that it was just one method.This fixed the problem on N, but obviously also made my
TextVieweditable.To fix this I had to change the cursor back and remove suggestions.
Hopefully this is helpful.