This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Forum: Meta: Markdown in Biostars (now enabled)

I am sure most of us that use GitHub love its text editor. Would it even be remotely possible for Biostars to add github flavored markdown in its text area, for editing posts/answers/comments? Would it be welcomed by the community here?

If it's OK with Istvan, I can definitely help with this task.

meta

Put me down as in favor!

5 answers

Markdown editing has been enabled.

Old posts will be parsed into Markdown once we identify all the tricky posts that might break the process Changing the editing to markdown should have taken a lot less time. It is just one of these cases where aiming for a perfect solution became the enemy of good enough.

I mentioned this above, the Markdown library that we use supports the so called "fenced" code blocks. Enclosing code within triple backquotes on separate lines will mark that text as code. This is handy when indenting by four spaces is difficult. Example:

```
cat data.fq | grep "ATGC" | wc -l
```

Wow, This is cool. I am surprised with comment box and answer box changes. But where is color highlighting? removed? I am editing this again after submitting, so the code sample option highlighting in red.

Inlined code is red. That is code flanked with text.

Block code is syntax highlighted. Block code is separated by the body text via empty lines:

This is block code

You're the best

Istvan,

The fenced code blocks work as blocks only when indented. When not, even if we do use triple quotes on new lines, the code is rendered formatted as red inline code but within a block.

```
cat data.fq | grep "ATGC" | wc -l
```

vs

cat data.fq | grep "ATGC" | wc -l

======================================================================================

EDIT: Well that backfired splendidly. The reason is, the preview doesn't show you what's actually going to happen.

For example, the preview: Preview_Image

becomes the actual content: Actual_Image

Great news! Will you enable the syntax for markdown spoilers?

Seems quite useful for the TL;DR part of posts,

! but not currently working

We are trying to use existing markdown libraries (though we had to patch some code in the current package as well as in the bleach sanitizing library). What this also means is that we use of the features that these libraries already offer. Spoilers do not seem to be supported.

I hope that we can adopt Common Mark and eventually its extensions.

I would definitely appreciate using markdown to write posts.

Any news on progress?

I must have missed this post when it was first posted. +1. I definitely support the idea.

I am so down for this, I really dislike this editor that I've put in ...

I'd quote you on that, but since there's no way to quote in biostars, i'll code block you on that ;-)

No, in all seriousness Istvan, I first found out about Biostars not because of anything bioinformatics-related, but because I was looking for an opensource StackExchange-like Q and A system for my lab. I was a wetlab biologists back then, so I didn't really know the term "Bioinformatics" at all. After looking at a lot of options, and asking around different places, Biostars was unanimously the best. Then I re-found it a year later when I started programming :)

So, we implement this, correct? I do not know django, but it looks like an MVC framework, so we'd have to update the views. If you can show me an example, I can work on the others - I have experience with Razor and ASP.NET MVC2, but no open source MVC implementations.

I did actually work it all out for Biostar 3 that was supposed to be released and had markdown by default. I just did not like how the rest of it turned out and got "canned". Let me take a look at my code and truth to be told it is not difficult to move to markdown it just needs about one good days of work. But lately I have a hard time setting that aside - it is not just one typical day, but one with no other interruptions etc.

I made a new github issue and will create a branch for it that will keep tagging this issue as work progresses. Please follow that:

https://github.com/ialbert/biostar-central/issues/399

Migrated the code base to Markdown. So far looks good and fully functional. Will test it more extensively with the real data on Friday and if all looks good will switch over during the weekend.

wow, that is very fast! I was bumping it to get the issue back on table, and never expected anything to happen this fast. Thank you!

OK the markdown has been enabled. Various breakage may occur because in general handling user input can be quite challenging.

The markdown library that I am using supports fenced codeblocks. That means you can format code by enclosing the code within lines that contain only triple back quotes ``` This is easier to do than indenting by four spaces.

I am trying some new syntax highlighting that is bioinformatics tool aware, let's see:

bwa mem data.fq

I am also in favor of it!

Log in to answer this question.