Greasy Fork is available in English.

Discussions » Greasy Fork Feedback

Markdown in the forum

§
Posted: 15 September 2014

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: 15 September 2014
Edited: 15 September 2014

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

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

@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: 15 September 2014

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: 15 September 2014
Edited: 16 September 2014
  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: 15 September 2014

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: 15 September 2014

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: 16 September 2014
Edited: 16 September 2014

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: 19 September 2014

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: 20 September 2014
Edited: 20 September 2014

@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: 22 September 2014
Edited: 24 September 2014

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: 26 September 2014
§
Posted: 28 September 2014

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

§
Posted: 28 September 2014

@wOxxOm I used your CSS for tables. Thanks!

§
Posted: 29 September 2014

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

§
Posted: 11 November 2014

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

§
Posted: 11 November 2014

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: 14 November 2014

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: 14 November 2014
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: 14 November 2014
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: 14 November 2014
Edited: 04 Desember 2014

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: 04 Desember 2014
Edited: 05 Desember 2014
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.