• The forum software that supports hummy.tv has been upgraded to XenForo 2.1!

    This upgrade brings a number of improvements including the ability to bookmark posts to come back to later. Please bear with us as we continue to tweak things and open a new thread for any questions, issues or suggestions in Site/Forum Issues.

New Support for basic Markdown

af123

Administrator
Staff member
I've written an initial XenForo Add-on to add basic support for a style of markdown formatting syntax to the forum.
It's a per-user preference which is off by default, and it effectively just replaces some markdown-style tags in your posts with BBCODE before previewing or posting - so it all ends up in the database in BBCODE and if you edit the post later then you'll see the BBCODE.

You can enable it through https://hummy.tv/forum/account/preferences - so far it supports:

``` - for code bocks
` - for inline code
__ or ** - for bold
_ or * - for italic


Here's an example screenshot with the preview showing.

1522062444275.png
 
Last edited:

gomezz

Well-Known Member
Age old convention dating back to teletypes is _underscore_ and /italicise/. Why does this not follow that convention?
 
OP
af123

af123

Administrator
Staff member
Proper markdown should be *italic* or _italic_ and **bold** or __bold__ - I've taken a liberty already by just using _
 
Last edited:

Black Hole

May contain traces of nut
Age old convention dating back to teletypes is _underscore_ and /italicise/. Why does this not follow that convention?
I agree, and have already said so somewhere. The's no reason we can't have our own standard markup language, there doesn't seem to be a single set standard. There just might be a bit of a parsing problem when / is used so commonly for other things.
Proper markdown should be *italic* or _italic_ and **bold** or __bold__ - I've taken a liberty already by just using _
Frankly, that's plain silly.
 
OP
af123

af123

Administrator
Staff member
The's no reason we can't have our own standard markup language, there doesn't seem to be a single set standard.
We're not going down that road, there may be no RFC for it but the general syntax is well established. The reason I am adding markdown support is because over the past couple of years I've come to use it every day across a large number of platforms (GitHub, Gitter, Jenkins, MatterMost, Reviewboard, Slack to name a few) and when I come here, BBCODE seems clumsy. There's no downside to supporting it now that it's a user preference that defaults to off and it's just a translation layer between the text box and the system. This one might even be worth publishing as a package for other forums to use once it matures a bit.
 

Ezra Pound

Well-Known Member
I feel as if a QI Klaxon is going to go off any second for asking this, but, as there are ways of adding bold, italics, code and inline code to posts already, I'm stuggling to see why a user would use this Markdown facilty
 
OP
af123

af123

Administrator
Staff member
I feel as if a QI Klaxon is going to go off any second for asking this, but, as there are ways of adding bold, italics, code and inline code to posts already, I'm stuggling to see why a user would use this Markdown facilty
Well it's certainly quicker and if you're used to markdown from other places then it's easier.
 

Ezra Pound

Well-Known Member
Ah OK - Thanks
BTW
In your #1 example above you have :-
'Single asterisk bold single asterisk' creating a bold version of the text, shouldn't that require double asterisks or double underscores?
before.jpg
Should be :-

after.jpg
 
Last edited:
Top