notachair
|
|
Posted on: July 11, 2010, 03:21:33 am |
|
|
Definitely not a chair
Joined: Feb 2008
Posts: 299
|
Ever since coming across Markdown, thanks to its usage on Stack Overflow, I'm liking it quite a bit. I'm thinking about getting the issue tracker to use Markdown instead of BBcode. In case you don't know what Markdown is, you can check out its syntax here, or have a look at the below example. It's a bit like Wikipedia's markup, actually. > No I'm not insane
**READ THIS!**
You're all *\*insane\** people, proof:
function are_insane(what) { are_insane('[b]yes[/b]'); }
**You guys are therefore all insane.**
Here's some more reasons:
1. You're all stupid 2. Stop huffing kittens 3. Unicorns don't exist, really
/faints Which in BBcode ( NOT SMF FLAVOURED, THIS IS GENERAL) would be: [quote]No I'm not insane[/quote]
[b]READ THIS![/b]
You're all [i]*insane*[/i] people, proof:
[code]function are_insane(what) { are_insane('[noparse][b]yes[/b][/noparse]') }[/code ]
[b]You guys are therefore all insane.[/b]
Here's some more reasons:
[ol] [list][li]You're all stupid [/li][li]Stop huffing kittens [list][li]Unicorns don't exist, really [/ol]
/faints[/list][/list] And what it looks like: No I'm not insane READ THIS!
You're all *insane* people, proof:
function are_insane(what) { are_insane('[b]yes[/b]') } You guys are therefore all insane.
Here's some more reasons:
- You're all stupid
- Stop huffing kittens
- Unicorns don't exist, really
/faints
That's somewhat inconvenient though for things like code blocks, so I'm looking at PHP Markdown Extra. Fenced Code Blocks
Version 1.2 of PHP Markdown Extra introduced a syntax code block without indentation. Fenced code blocks are like Markdown’s regular code blocks, except that they’re not indented and instead rely on a start and end fence lines to delimit the code block. The code block start with a line containing three or more tilde ~ characters, and ends with the first line with the same number of tilde ~. For instance:
This is a paragraph introducing:
~~~~~~~~~~~~~~~~~~~~~ a one-line code block ~~~~~~~~~~~~~~~~~~~~~ Contrary to their indented counterparts, fenced code blocks can begin and end with blank lines:
~~~
blank line before blank line after
~~~ Indented code blocks cannot be used immediately following a list because the list indent takes precedence; fenced code block have no such limitation:
1. List item
Not an indented code block, but a second paragraph in the list item
~~~~ This is a code block, fenced-style ~~~~
|
|
« Last Edit: July 11, 2010, 03:56:35 am by a2h »
|
Logged
|
|
|
|
MahFreenAmeh
|
|
Reply #1 Posted on: July 11, 2010, 02:54:06 pm |
|
|
sysadmin
"Web Team" Location: Austin, TX Joined: Apr 2008
Posts: 13
|
Well, you could always just grab the markdown formatter and hack it out to give it the features you need, as well... heh.
In any case, it seems like a solid choice to me.
|
|
|
Logged
|
sys(tem)admin(istrator) [java,c++,c,javascript,html,css,php,perl,ruby,python,sql] if you've got ideas, let me hear them.
|
|
|
Josh @ Dreamland
|
|
Reply #2 Posted on: July 11, 2010, 05:00:32 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
You've my support on the idea. It's about time people started merging the two anyway; markdown is a beautiful format.
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
IsmAvatar
|
|
Reply #4 Posted on: July 18, 2010, 02:10:00 pm |
|
|
LateralGM Developer
Location: Pennsylvania/USA Joined: Apr 2008
Posts: 877
|
I have yet to find a lightweight markup language that I like, but BBCode has come pretty close, sadly. Markdown is horrible for trying to put HTML in a codebox. <div> <span> <a href="http://www.google.com">Link 1</a>
| <a href="http://www.google.com">Link 2</a> </span> </div> Use your fancy ~~~ trick, and the above code will become actual html, so you will actually see 2 links, rather than the raw html code like you should. Adding 4 spaces before each line seems to solve it, but it's annoying as hell, especially when you start pasting in long segments of html code. Not to mention if a user decides to use html and forgets to end one of the tags... the rest of the page is screwed up. http://daringfireball.net/projects/markdown/dingusThat's a Markdown testing page. Simply type in <del>, click "Convert", and scroll down to observe the mayhem.
|
|
« Last Edit: July 18, 2010, 02:25:06 pm by IsmAvatar »
|
Logged
|
|
|
|
notachair
|
|
Reply #5 Posted on: July 18, 2010, 09:27:30 pm |
|
|
Definitely not a chair
Joined: Feb 2008
Posts: 299
|
I have yet to find a lightweight markup language that I like, but BBCode has come pretty close, sadly.
Markdown is horrible for trying to put HTML in a codebox.
<div> <span> <a href="http://www.google.com">Link 1</a>
| <a href="http://www.google.com">Link 2</a> </span> </div> Use your fancy ~~~ trick, and the above code will become actual html, so you will actually see 2 links, rather than the raw html code like you should. Adding 4 spaces before each line seems to solve it, but it's annoying as hell, especially when you start pasting in long segments of html code.
Not to mention if a user decides to use html and forgets to end one of the tags... the rest of the page is screwed up. http://daringfireball.net/projects/markdown/dingus That's a Markdown testing page. Simply type in <del>, click "Convert", and scroll down to observe the mayhem.
That's because ~~~ isn't part of the original Markdown specification and instead part of "PHP Markdown Extra", and I mentioned that in the OP quite clearly.
|
|
|
Logged
|
|
|
|
|
MahFreenAmeh
|
|
Reply #7 Posted on: July 19, 2010, 10:40:24 am |
|
|
sysadmin
"Web Team" Location: Austin, TX Joined: Apr 2008
Posts: 13
|
DOOOOONGS
|
|
|
Logged
|
sys(tem)admin(istrator) [java,c++,c,javascript,html,css,php,perl,ruby,python,sql] if you've got ideas, let me hear them.
|
|
|
|