Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ NEW: Add myst_fence_as_directive config #742

Merged
merged 2 commits into from
Mar 7, 2023
Merged

Conversation

chrisjsewell
Copy link
Member

@chrisjsewell chrisjsewell commented Mar 7, 2023

closes #366

Setting the following config, for example:

extensions = ["myst_parser", "sphinxcontrib.mermaid"]
myst_fence_as_directive = ["mermaid"]
# optional to use https://sphinxcontrib-mermaid-demo.readthedocs.io/en/latest/#directive-options
myst_enable_extensions = ["attrs_block"]

allows for one to write

{caption="My caption"}
{alt="HTML alt" align=center}
```mermaid
graph LR
a --> b
```

and have interoperable rendering with places like GitHub:

{caption="My caption"}
{alt="HTML alt" align=center}

graph LR
a --> b
Loading

@codecov
Copy link

codecov bot commented Mar 7, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.03 🎉

Comparison is base (1e440e6) 89.96% compared to head (926b4f5) 89.99%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #742      +/-   ##
==========================================
+ Coverage   89.96%   89.99%   +0.03%     
==========================================
  Files          23       23              
  Lines        2969     2978       +9     
==========================================
+ Hits         2671     2680       +9     
  Misses        298      298              
Flag Coverage Δ
pytests 89.99% <100.00%> (+0.03%) ⬆️

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

Impacted Files Coverage Δ
myst_parser/config/main.py 86.33% <100.00%> (+0.30%) ⬆️
myst_parser/mdit_to_docutils/base.py 92.69% <100.00%> (+0.03%) ⬆️

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.

@chrisjsewell chrisjsewell merged commit 8508bf7 into master Mar 7, 2023
@chrisjsewell chrisjsewell deleted the fence_as_directive branch March 7, 2023 18:10
endolith added a commit to endolith/elsim that referenced this pull request Mar 20, 2023
probably related to
executablebooks/MyST-Parser#742
and
executablebooks/MyST-Parser#366 and needing

```{mermaid}

instead of the usual

```mermaid

that renders in GitHub, Typora, etc.
endolith added a commit to endolith/elsim that referenced this pull request Mar 20, 2023
probably related to
executablebooks/MyST-Parser#742
and
executablebooks/MyST-Parser#366 and needing

```{mermaid}

instead of the usual

```mermaid

that renders in GitHub, Typora, etc.
endolith added a commit to endolith/elsim that referenced this pull request Mar 21, 2023
probably related to
executablebooks/MyST-Parser#742
and
executablebooks/MyST-Parser#366 and needing

```{mermaid}

instead of the usual

```mermaid

that renders in GitHub, Typora, etc.
endolith added a commit to endolith/elsim that referenced this pull request Apr 6, 2023
probably related to
executablebooks/MyST-Parser#742
and
executablebooks/MyST-Parser#366 and needing

```{mermaid}

instead of the usual

```mermaid

that renders in GitHub, Typora, etc.
endolith added a commit to endolith/elsim that referenced this pull request Apr 6, 2023
probably related to
executablebooks/MyST-Parser#742
and
executablebooks/MyST-Parser#366 and needing

```{mermaid}

instead of the usual

```mermaid

that renders in GitHub, Typora, etc.
endolith added a commit to endolith/elsim that referenced this pull request Apr 11, 2023
probably related to
executablebooks/MyST-Parser#742
and
executablebooks/MyST-Parser#366 and needing

```{mermaid}

instead of the usual

```mermaid

that renders in GitHub, Typora, etc.
endolith added a commit to endolith/elsim that referenced this pull request Apr 11, 2023
probably related to
executablebooks/MyST-Parser#742
and
executablebooks/MyST-Parser#366 and needing

```{mermaid}

instead of the usual

```mermaid

that renders in GitHub, Typora, etc.
endolith added a commit to endolith/elsim that referenced this pull request Apr 17, 2023
probably related to
executablebooks/MyST-Parser#742
and
executablebooks/MyST-Parser#366 and needing

```{mermaid}

instead of the usual

```mermaid

that renders in GitHub, Typora, etc.
endolith added a commit to endolith/elsim that referenced this pull request Apr 19, 2023
probably related to
executablebooks/MyST-Parser#742
and
executablebooks/MyST-Parser#366 and needing

```{mermaid}

instead of the usual

```mermaid

that renders in GitHub, Typora, etc.
endolith added a commit to endolith/elsim that referenced this pull request Apr 19, 2023
probably related to
executablebooks/MyST-Parser#742
and
executablebooks/MyST-Parser#366 and needing

```{mermaid}

instead of the usual

```mermaid

that renders in GitHub, Typora, etc.
endolith added a commit to endolith/elsim that referenced this pull request Apr 19, 2023
probably related to
executablebooks/MyST-Parser#742
and
executablebooks/MyST-Parser#366 and needing

```{mermaid}

instead of the usual

```mermaid

that renders in GitHub, Typora, etc.
endolith added a commit to endolith/elsim that referenced this pull request Apr 29, 2023
probably related to
executablebooks/MyST-Parser#742
and
executablebooks/MyST-Parser#366 and needing

```{mermaid}

instead of the usual

```mermaid

that renders in GitHub, Typora, etc.
endolith added a commit to endolith/elsim that referenced this pull request May 3, 2023
probably related to
executablebooks/MyST-Parser#742
and
executablebooks/MyST-Parser#366 and needing

```{mermaid}

instead of the usual

```mermaid

that renders in GitHub, Typora, etc.
endolith added a commit to endolith/elsim that referenced this pull request May 5, 2023
probably related to
executablebooks/MyST-Parser#742
and
executablebooks/MyST-Parser#366 and needing

```{mermaid}

instead of the usual

```mermaid

that renders in GitHub, Typora, etc.
endolith added a commit to endolith/elsim that referenced this pull request Jun 24, 2023
probably related to
executablebooks/MyST-Parser#742
and
executablebooks/MyST-Parser#366 and needing

```{mermaid}

instead of the usual

```mermaid

that renders in GitHub, Typora, etc.
endolith added a commit to endolith/elsim that referenced this pull request Nov 2, 2023
probably related to
executablebooks/MyST-Parser#742
and
executablebooks/MyST-Parser#366 and needing

```{mermaid}

instead of the usual

```mermaid

that renders in GitHub, Typora, etc.
endolith added a commit to endolith/elsim that referenced this pull request Nov 18, 2024
probably related to
executablebooks/MyST-Parser#742
and
executablebooks/MyST-Parser#366 and needing

```{mermaid}

instead of the usual

```mermaid

that renders in GitHub, Typora, etc.
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.

support mermaid
1 participant