Discussions » Greasy Fork Feedback

Markdown in the forum

§
Posted: 2014-09-15

Markdown in the forum

You can now post Markdown in the forum. The forum is using PHP Markdown, which is different than what the main site uses, so there may be some differences.

Feel free to use this thread for testing, and let us know of any problems you encounter.

§
Posted: 2014-09-15
Edited: 2014-09-15

This is great; now I can just type without doing the annory tags , and everything.

alert(function () {
    return 'hello world';
} ());
§
Posted: 2014-09-15
Edited: 2014-09-15

@JasonBarnabe, Problem number 1!

Code block inside ``` are parsed as code, was expecting pre.

Another thing, can I set markdown as default when I want to type something?

§
Posted: 2014-09-15

It always defaults to HTML for new posts right now, but I intend to have a site-wide option for which markup you want to use.

wOxxOmMod
§
Posted: 2014-09-15
Edited: 2014-09-16
  1. syntax highlighting : syntax highlighting in fenced code blocks with language specifier would be nice. The doc says it's possible but I couldn't make it work neither via ``nor~~~`.

    //code<br>
    

    Guess a white/lightgray background would be necessary.

  1. pre : the doc says to use ~~~ (three or more tildes on a separate line):

    some code
    
  2. tables : need some padding and borders apparently:

    a b
    1 2
    3 4
§
Posted: 2014-09-15

If I quote woxxom in a html comment this is the result. If I quote in a markdown comment the result is worse. But I do get a warning either way: "The quote had to be converted from Markdown to Html. Some formatting may have been lost."

* syntax highlighting syntax highlighting in fenced code blocks with language specifier would be nice. The doc says it's possible but I couldn't make it work neither via ``` nor ~~~.

~~~ javascript
//code
~~~



Guess a white background would be necessary.


* pre the doc says to use ~~~ (three or more tildes on a separate line):

some code


* tables need some padding and borders apparently:

a b 1 2 3 4
§
Posted: 2014-09-15

Just as a test, in case it was just a problem with the preview - here's a quote in a markdown comment:

* syntax highlighting syntax highlighting in fenced code blocks with language specifier would be nice. The doc says it's possible but I couldn't make it work neither via ``` nor ~~~. ~~~ javascript //code ~~~ Guess a white background would be necessary. * pre the doc says to use ~~~ (three or more tildes on a separate line): some code * tables need some padding and borders apparently: a b 1 2 3 4
wOxxOmMod
§
Posted: 2014-09-16
Edited: 2014-09-16

I wonder if the quote button can be taught to preserve the original formatting, this would allow nested quotes. Markdown syntax allows that:

Quote

nested quote

Quote

§
Posted: 2014-09-19

It looks like Vanilla includes a version of this library from 2009, without support for fenced code blocks and other stuff. I've asked if there's any reason for this.

The newer version of the quoting plugin looks a bit better at handling different formats. I'm going to try it out once they fix something I reported...

wOxxOmMod
§
Posted: 2014-09-20
Edited: 2014-09-20

@JasonBarnabe, regarding tables: padding and borders are zeroed in the main style.css /* Reset CSS */ section. Some CSS rules should be added explicitly, maybe those github uses?

github-table

Here's another example of a fine free CSS:

table-airy

Below is my kinda lame attempt to make a 'greasyforkish' table, you may use or adapt it:

tables

.Message table {
   border-collapse: separate;
   border-spacing: 4px;
   margin: 1em -4px; /* -4px neutralizes the border-spacing on the outer borders */;
}
.Message th, .Message td {
   padding: 2px 1em;
}
.Message th {
   background-color: rgba(103,0,0,0.2);
   font-weight: bold;
   font-size: 105%;
   padding-top: 0.5em;
   padding-bottom: 0.5em;
}
.Message th:nth-child(odd) {
   background-color: rgba(103,0,0,0.15);
}
.Message tr:nth-child(even) td {
   background-color: rgba(0,0,0,0.05);
}
.Message tr:nth-child(even) td:nth-child(even) {
   background-color: rgba(50,0,0,0.08);
}
.Message tr:nth-child(odd) td:nth-child(even) {
   background-color: rgba(255,0,0,0.03);
}
wOxxOmMod
§
Posted: 2014-09-22
Edited: 2014-09-24

Markdown quotes of html-formatted messages should escape with \ the characters that otherwise would be treated as format codes: *, _, # well, the entire gang, actually.

§
Posted: 2014-09-28

I've upgraded to the newest version of PHP Markdown, which I see gives fenced code blocks (but no syntax highlighting).

§
Posted: 2014-09-28

@wOxxOm I used your CSS for tables. Thanks!

§
Posted: 2014-09-29

Test multi-line backticks: foreach(foo as bar) { ... }

§
Posted: 2014-11-11

I've upgraded the Quotes plugin, which should make quoting someone who chose a different format suck less.

§
Posted: 2014-11-11

Test user name with a space:

I've upgraded the Quotes plugin, which should make quoting someone who chose a different format suck less.
§
Posted: 2014-11-14

Sorry I post here is kind of a test for https://github.com/JasonBarnabe/greasyfork/issues/312 but at the same time I tried to find a topic in which I have something to say.

Thanks for Markdown it’s my favourite ! Could it be possible that the forum would remember my last choice (Markdown radio button) ? I know I could make a user script that would always auto-check that input[type='radio'][name='Format'][value='Markdown'], but it would rather be a nice genuine feature in the server code itself… :)

wOxxOmMod
§
Posted: 2014-11-14
I've upgraded the Quotes plugin

Nice, but... all the old quotes now aren't styled because they do not have class="Quote". Maybe it's possible to modify the css simply by adding , blockquote to the .Quote { rule?

§
Posted: 2014-11-14
Could it be possible that the forum would remember my last choice (Markdown radio button) ?

https://github.com/JasonBarnabe/greasyfork/issues/314

all the old quotes now aren't styled

https://github.com/vanilla/addons/issues/152

wOxxOmMod
§
Posted: 2014-11-14
Edited: 2014-12-04

So does it mean that we will wait for vanilla to fix it in some distant future or is it still possible to simply modify/duplicate the .Quote css to blockquote?

blockquote {
    padding: 1ex 16px;
    margin: 1em 0;
    background: #f3f3f3;
    background: rgba(0, 0, 0, 0.05);
    border-left: 4px solid rgba(0, 0, 0, 0.1);
}

I've added this to my userstyle.

wOxxOmMod
§
Posted: 2014-12-04
Edited: 2014-12-05
I intend to have a site-wide option for which markup you want to use.

...almost three months have passed filled with clicks to the option, it's hard to endure this anymore, so I've made a userscript that selects (*) markdown by default along with a few small features:

Post reply

Sign in to post a reply.