siilihai-client
siilihai-client copied to clipboard
Detect forum formatting?
Formatting links and text in posts varies from forum to forum, so i wonder if it's possible to detect and display each forum's setup.
Could you elaborate a bit? In parsed forums they are HTML and in TapaTalk they seem to be mostly standard markdown code. Can you give an example?
It may be an edge case come to think of it, but take Reddit's customised markdown formatting. You link with reddit! vs [url=http://reddit.com]reddit![/url], which is more elegant. If they do it, other's must.
I think reddit has more complex structure than a "normal" forum. Perhaps Reddit-specific reader code could be done and implemented in Siilihai some day.
Anyway, in TapaTalk forums the conversion is done here:
https://github.com/vranki/libsiilihai/blob/master/src/siilihai/tapatalk/tapatalkengine.cpp#L41
It converts the markup to basic html. If it's missing some elements, I can add them there.