Skip to content

Commit

Permalink
Release version 0.0.0.dev10
Browse files Browse the repository at this point in the history
  • Loading branch information
AAriam committed Sep 24, 2024
1 parent 5706e5b commit 8e9b541
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 21 deletions.
13 changes: 8 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,18 @@ namespaces = true
# ----------------------------------------- Project Metadata -------------------------------------
#
[project]
version = "0.0.0.dev9"
version = "0.0.0.dev10"
name = "MDit"
requires-python = ">=3.10"
dependencies = [
"sphinx < 8",
"myst-parser > 3, < 4",
"myst-nb > 1, < 2",
"pydata-sphinx-theme",
"sphinx-design >= 0.6",
"sphinx-togglebutton",
"sphinx-design",
"sphinx-copybutton >= 0.5",
"sphinxcontrib-mermaid >= 0.9",
"sphinx-tippy == 0.4.3",
"markdown-it-py",
"mdit-py-plugins",
"linkify-it-py",
Expand All @@ -39,10 +42,10 @@ dependencies = [
"pydantic >= 2.9",
"referencing >= 0.35.1",
"PkgData == 0.0.0.dev4",
"PySerials == 0.0.0.dev12",
"PySerials == 0.0.0.dev14",
"PyBadger == 0.0.0.dev11",
"PyColorIT == 0.0.0.dev7",
"ProtocolMan == 0.0.0.dev2",
"HTMP == 0.0.0.dev5",
"JSONSchemata == 0.0.0.dev8",
"JSONSchemata == 0.0.0.dev10",
]
15 changes: 0 additions & 15 deletions src/mdit/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -940,8 +940,6 @@ def __init__(
return

def _source_md(self, target: MDTargetConfig, filters: str | list[str] | None = None) -> str:
if not target.field_list:
return self._source_md_normal_list(target=target, filters=filters)
content = self.content.source(target=target, filters=filters)
if (self.classes or self.name) and target.attrs_block:
return attribute(
Expand All @@ -966,19 +964,6 @@ def _source_rich(self, target: RichTargetConfig, filters: str | list[str] | None
]
return self.config_rich.make(items)

def _source_md_normal_list(self, target: MDTargetConfig, filters: str | list[str] | None = None) -> str:
titles: list[str] = []
bodies = []
for item in self.content.elements(target=target, filters=filters):
titles.append(item.title.source(target=target, filters=filters))
bodies.append(item.body.source(target=target, filters=filters))
max_title_len = max([len(title) for title in titles], default=0)
lis = unordered_list()
for title, body in zip(titles, bodies):
spaces = "&nbsp;" * (max_title_len - len(title))
lis.append(f"**{title}**{spaces} : {body}")
return lis.source(target=target, filters=filters)

def append(
self,
title: ContainerContentInputType | MDContainer | None = None,
Expand Down
9 changes: 8 additions & 1 deletion src/mdit/target/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,12 @@ def sphinx(
_render.sphinx,
config={
"extensions": [
'myst_parser',
'myst_nb',
'sphinx_design',
'sphinx_togglebutton',
'sphinx_copybutton',
'sphinxcontrib.mermaid',
'sphinx_tippy',
],
"myst_enable_extensions": [
"amsmath",
Expand All @@ -149,6 +152,10 @@ def sphinx(
"tasklist",
],
"html_theme": "pydata_sphinx_theme",
"html_theme_options": {
"pygments_light_style": "default",
"pygments_dark_style": "monokai",
},
"html_title": "",
}
),
Expand Down

0 comments on commit 8e9b541

Please sign in to comment.