#7987 Standardize fenced blocks in markdown

v1.4.0
closed
General
2016-01-11
2015-09-14
No

Switch from our custom FencedCodeProcessor to the standard extension https://pythonhosted.org/Markdown/extensions/fenced_code_blocks.html so that we can support ``` style, and so that blank lines are not needed before and after the ~~~~ blocks. This will get us more closely aligned with the CommonMark standard, and the syntax highlighting of the markdown editor, and the

However, the format for denoting the language inside the block is different there than the CodeHilite extension which we are already using (and our current ~~~~ uses as well since it simply makes an indented block). So we'll have to figure out how to reconcile that.

Related

Tickets: #7020
Tickets: #7955
Tickets: #8040

Discussion

  • Dave Brondsema

    Dave Brondsema - 2015-09-21
    • labels: --> sf-current, sf-4
     
  • Igor Bondarenko

    Igor Bondarenko - 2015-12-25
    • labels: sf-current, sf-4 --> sf-current, sf-4, 42cc
    • status: open --> in-progress
    • assigned_to: Igor Bondarenko
     
  • Igor Bondarenko

    Igor Bondarenko - 2016-01-05
    • status: in-progress --> review
     
  • Igor Bondarenko

    Igor Bondarenko - 2016-01-05

    Closed #882. ib/7987

    TBH, I was surprised it worked with minimal changes. Make sure I did not miss something :)

     
  • Dave Brondsema

    Dave Brondsema - 2016-01-06
    • status: review --> closed
    • Reviewer: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2016-01-06

    Excellent! I tested every combination of code blocks and language specifiers I could think of and they all work, I love it! This enables lots of nice formatting features:

    • backticks not just tildes
    • language specifier can go in backtick/tilde line, matching CommonMark and github format
    • no blank line required before and after
    • can nest backtick and/or tilde lines within a block (if different type/number of them)
    • code blocks work immediately before or after lists
     
  • Dave Brondsema

    Dave Brondsema - 2016-01-11
    • labels: sf-current, sf-4, 42cc --> sf-4, 42cc
     
  • Dave Brondsema

    Dave Brondsema - 2016-04-11
    • Milestone: unreleased --> v1.4.0
     

Log in to post a comment.