CommonMark testing started here!

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]

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

10 Likes

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.

1 Like

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

https://github.com/discourse/discourse/tree/master/app/mailers

I did manage to disable with the ugly:

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

https://github.com/discourse/discourse/tree/master/app/mailers  

But that’s not so easy to type.

8 Likes

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

https://github.com/markdown-it/markdown-it/issues/375

5 Likes

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.

4 Likes

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.

2 Likes

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.

3 Likes
1 2 3 4
Call 11 12 11 13
Text 15 1 5 18
Browse 122 2 6 110

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

1 Like

That is a bug, we will get it fixed!

8 Likes

The oneboxing issue is fixed:

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

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

 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.

14 Likes

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…

13 Likes

I fixed that per:

https://github.com/discourse/discourse/commit/fed57be9edd73c31842626176e4a68da4f5f3f43

Should be deployed here shortly.

4 Likes

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

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

8 Likes

I guess the idea is that there are indeed three dots, but one of them is part of the question mark (or exclamation mark) :wink:

?.. !..

4 Likes

Not quite. Typographically, three dots are an ellipsis and and ellipsis is always three dots. There is no two to ellipsis and I am not aware of any style guide that suggests that the question mark or exclamation mark can replace one of the dots. By contrast, there are plenty of recommendations that suggest the use of a punctuation mark plus three dots (and, while we’re at it: to separate them from the punctuation mark with a space):

1 Like

I suggest you open this on the markdown it Github issues page cause we are simply consuming the functionality

6 Likes

Woo markdown tables!

1 Like

I did. They are using Russian typography and they’re basically sending the ball back to you by answering:

you can disable replacer and add your own if you don’t like existing one.

https://github.com/markdown-it/markdown-it/issues/376#issuecomment-311588034