Skip to content

👌 Improve: Non-directive colon-fences#713

Merged
chrisjsewell merged 2 commits into
masterfrom
fix-code-blocks
Feb 21, 2023
Merged

👌 Improve: Non-directive colon-fences#713
chrisjsewell merged 2 commits into
masterfrom
fix-code-blocks

Conversation

@chrisjsewell
Copy link
Copy Markdown
Member

@chrisjsewell chrisjsewell commented Feb 21, 2023

At present, colon fences without a directive specified (e.g. :::{note}) are treated as code bocks

:::name
Some text
:::
<code language=name>
    Some text

In keeping with the purpose of these block, as containers for nested MyST content, they are now converted to:

<div class=name>
   <paragraph>
      Some text

This is also in keeping with the original pandoc/djot inspiration https://htmlpreview.github.io/?https://github.com/jgm/djot/blob/master/doc/syntax.html#div

@chrisjsewell
Copy link
Copy Markdown
Member Author

cc @rowanc1 @choldgraf

@rowanc1
Copy link
Copy Markdown
Member

rowanc1 commented Feb 21, 2023

Makes sense to me, and like that there is a difference between colons and backticks.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 21, 2023

Codecov Report

Base: 89.31% // Head: 89.36% // Increases project coverage by +0.05% 🎉

Coverage data is based on head (599202e) compared to base (ac111ea).
Patch coverage: 83.33% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #713      +/-   ##
==========================================
+ Coverage   89.31%   89.36%   +0.05%     
==========================================
  Files          23       23              
  Lines        2844     2867      +23     
==========================================
+ Hits         2540     2562      +22     
- Misses        304      305       +1     
Flag Coverage Δ
pytests 89.36% <83.33%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
myst_parser/mdit_to_docutils/base.py 92.88% <75.00%> (+0.07%) ⬆️
myst_parser/parsers/docutils_.py 80.81% <91.66%> (+0.81%) ⬆️
myst_parser/sphinx_ext/main.py 89.74% <100.00%> (+0.26%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants