CommonMark testing started here!


(Rafael dos Santos Silva) #6

Wikipedia Table (converted to markdown)

Name Programming language License
bbPress PHP[2] GPL[3]
Beehive Forum PHP GPL
Discourse Ruby, JavaScript GPL
Discuz! PHP Discuz! EULA
eXo Platform Java LGPL
FluxBB PHP GPL
FUDforum PHP GPL
Ikonboard Perl Proprietary
Invision Power Board PHP Proprietary
MyBB PHP LGPL, moving to BSD in 2.0[14]
Phorum PHP Phorum License 2 (BSD like)
PHPWind PHP PHPWind EULA
phpBB PHP GPL
PunBB PHP GPL
Simple Machines PHP BSD License
Syndie Java Open source, multiple licenses
UBB.threads PHP Proprietary
Vanilla Forums PHP Proprietary/GPL[24]
vBulletin PHP[27] Proprietary[28]
Thredded Ruby MIT

It’s working :tada:


(Eli the Bearded) #7

Nesting code fences demo:

Here's how to make a code block in markdown:

```cpp
int main(int argc, char** argv) {
return 0;
```

And here’s how it’s coded:

````markdown
Here's how to make a code block in markdown:

```cpp
int main(int argc, char** argv) {
return 0;
```
````

To nest code blocks with a ``` codefence, just keep making outer codefences longer.

Will it nest to arbitrary depths? Six backtick version:

`````text
````markdown
Here's how to make a code block in markdown:

```cpp
int main(int argc, char** argv) {
return 0;
```
````
`````

And SEVEN!

``````text
`````text
````markdown
Here's how to make a code block in markdown:

```cpp
int main(int argc, char** argv) {
return 0;
```
````
`````
``````

This is the feature I’ve wanted for quoting things in “how to post in Discourse” messages.


(Daniela) #8

I have difficult when I need to insert some code in a post.
It seems that [code][/code] and <pre></pre> no longer work.

Will it be permanent or simply have not been implemented yet?


(Jeff Atwood) #9

Let’s see

<pre><code>int main(int argc, char** argv) {
return 0;
</code></pre>
int main(int argc, char** argv) {
return 0;

(Daniela) #10

On my forum if I insert <pre><code> </code></pre> I 've this result:

and this is the result when I use only <pre></pre> or <code></code>

So when commonMark will be fully implemented we need to use only <pre><code> </code></pre> ?


(Sam Saffron) #15

Fixed a bunch of edge cases with quoting and bbcode blocks

quote after a list

  • list
Fixed a bunch of edge cases with quoting and bbcode blocks
[quote]
nested
[quote]
test
[/quote]
[/quote]

quote after a list
- list 
[quote]
test
[/quote]

(Sam Saffron) #17

Nothing really changed with <pre> or <code> both work exactly as they used to …

I am pre-formatted 
   text
<pre>
I am pre-formatted 
   text
</pre>

It used to work and continues to work.


(Eli the Bearded) #18

Is there a way to disable a onebox and just show a link? Previously leading whitespace did that, but now that doesn’t seem to work.

vv two spaces
   https://github.com/discourse/discourse/tree/master/app/mailers

Shows as

discourse/app/mailers at master · discourse/discourse · GitHub

I did manage to disable with the ugly:

 https://github.com/discourse/discourse/tree/master/app/mailers &nbsp;

discourse/app/mailers at master · discourse/discourse · GitHub  

But that’s not so easy to type.


(Sam Saffron) #19

It is a bug :ant: will fix

It may take a day or so cause I need some guidance on the best approach to fix it from @Vitaly


#20

Seems i did not understood your question on github, sorry. Now got what you asked about.

I see 2 possible workarounds “in spirit of markdown”

  1. Define link text explicit (because such links should not be autoreplaced).
    • Less convenient.
  2. Use <http://...> autolink (wrap with <...>)
    • Easy, but user may wish to use it in very rage case when linkifier fails, to define link borders right. In this case such link will not be oneboxed.

Let me know if that is acceptable. Implementation should be simple - just test more link_open token attributes.


(Sam Saffron) #21

Trouble is that users have already been trained for a very long time that

spacehttp://somelink.com does not get a onebox.

and

http://somelink.com does get a onebox.

It is going to be super painful to teach everyone another option here.


#22

I understand :(. Sometime we should do horrible things, because users are not going to change their habits.

Then try patched paragraph rule (which stores info about trimmed head), as discussed on github. The only disadvantage is - it may be changed in upstream on CM spec update. But you can add test to signal about such change.


(Republic Wireless) #23
1 2 3 4
Call 11 12 11 13
Text 15 1 5 18
Browse 122 2 6 110

(Republic Wireless) #24

I wish it showed properly in the preview so I do not have to post this as a topic.


(Sam Saffron) #25

That is a bug, we will get it fixed!


(Sam Saffron) #26

The oneboxing issue is fixed:

Space prior to onebox stops onebox resolution · discourse/discourse@0d62420 · GitHub

 https://github.com/discourse/discourse/commit/0d62420cbe443b2cf1061405f83f34eef5103532

I did want to take a few moments to say :sun_with_face: :dancer: :sunny: to @Vitaly, it is absolutely amazing one can replace core behavior of the new engine in a very tidy and maintainable way without needing to fork the project. I am able to achieve in minutes stuff that used to take me hours when working with the previous Markdown engines.

The pipeline, date flow and token stream make for an amazingly clear design that is understandable by humans. Thank you.


(Sam Saffron) #27

I enabled the typographer here (with the site setting enable_markdown_typographer)

This means that:

(c) (C) (r) (R) (tm) (TM) (p) (P) +-

test.. test... test..... test?..... test!....

!!!!!! ???? ,,  -- ---

"Smartypants, double quotes" and 'single quotes'

renders as:

© © ® ® ™ ™ § § ±

test… test… test… test?.. test!..

!!! ??? , – —

“Smartypants, double quotes” and ‘single quotes’

I do not think we will enable it by default, but some communities have expressed interest in it so … here you go…


Autocorrect quote marks outside of code blocks
(Sam Saffron) #28

I fixed that per:

Should be deployed here shortly.


(Christoph) #29

Shouldn’t those render as test?.. and test!.. (i.e. three dots rather than two)?


(Sam Saffron) #30

Strongly depends on which color you like your bike shed :smile: