Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsewell committed Jul 16, 2024
1 parent 0f2d0b3 commit c73ec14
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 28 deletions.
45 changes: 20 additions & 25 deletions .github/workflows/test-formats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,31 +51,26 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -e .[linkify,rtd]
- name: replace emoji
# TODO getting: Missing character: There is no 🚀 (U+1F680) in font [FreeSansBold.otf]
run: |
sed -i 's/🚀 /-/g' docs/intro.md
sed -i 's/⚡ /-/g' docs/live-preview.md
- name: Build docs
run: |
sphinx-build -nW --keep-going -b ${{ matrix.format }} docs/ docs/_build/${{ matrix.format }}
- name: Make PDF
uses: xu-cheng/latex-action@v2
with:
working_directory: docs/_build/latex
root_file: "mystparser.tex"
# https://github.com/marketplace/actions/github-action-for-latex#it-fails-due-to-xindy-cannot-be-found
pre_compile: |
ln -sf /opt/texlive/texdir/texmf-dist/scripts/xindy/xindy.pl /opt/texlive/texdir/bin/x86_64-linuxmusl/xindy
ln -sf /opt/texlive/texdir/texmf-dist/scripts/xindy/texindy.pl /opt/texlive/texdir/bin/x86_64-linuxmusl/texindy
wget https://sourceforge.net/projects/xindy/files/xindy-source-components/2.4/xindy-kernel-3.0.tar.gz
tar xf xindy-kernel-3.0.tar.gz
cd xindy-kernel-3.0/src
apk add make
apk add clisp --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community
make
cp -f xindy.mem /opt/texlive/texdir/bin/x86_64-linuxmusl/
cd ../../
env:
XINDYOPTS: -L english -C utf8 -M sphinx.xdy
# TODO https://github.com/sphinx-doc/sphinx/issues/12594
# - name: Make PDF
# uses: xu-cheng/latex-action@v2
# with:
# working_directory: docs/_build/latex
# root_file: "mystparser.tex"
# # https://github.com/marketplace/actions/github-action-for-latex#it-fails-due-to-xindy-cannot-be-found
# pre_compile: |
# ln -sf /opt/texlive/texdir/texmf-dist/scripts/xindy/xindy.pl /opt/texlive/texdir/bin/x86_64-linuxmusl/xindy
# ln -sf /opt/texlive/texdir/texmf-dist/scripts/xindy/texindy.pl /opt/texlive/texdir/bin/x86_64-linuxmusl/texindy
# wget https://sourceforge.net/projects/xindy/files/xindy-source-components/2.4/xindy-kernel-3.0.tar.gz
# tar xf xindy-kernel-3.0.tar.gz
# cd xindy-kernel-3.0/src
# apk add make
# apk add clisp --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community
# make
# cp -f xindy.mem /opt/texlive/texdir/bin/x86_64-linuxmusl/
# cd ../../
# env:
# XINDYOPTS: -L english -C utf8 -M sphinx.xdy
9 changes: 6 additions & 3 deletions myst_parser/sphinx_ext/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from typing import Any

import sphinx
from docutils import nodes
from sphinx.application import Sphinx

Expand Down Expand Up @@ -42,9 +43,11 @@ def setup_sphinx(app: Sphinx, load_parser: bool = False) -> None:

# override only the html writer visit methods for rubric, to use the "level" attribute
# this allows for nested headers to be correctly rendered
app.add_node(
nodes.rubric, override=True, html=(visit_rubric_html, depart_rubric_html)
)
if sphinx.version_info < (7, 4):
# This is now added in sphinx: https://github.com/sphinx-doc/sphinx/pull/12506
app.add_node(
nodes.rubric, override=True, html=(visit_rubric_html, depart_rubric_html)
)
# override only the html writer visit methods for container,
# to remove the "container" class for divs
# this avoids CSS clashes with the bootstrap theme
Expand Down

0 comments on commit c73ec14

Please sign in to comment.