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

👌 Expand support for Python-Markdown in the admon plugin #94

Merged
merged 10 commits into from
Jan 11, 2024

Conversation

KyleKing
Copy link
Contributor

@KyleKing KyleKing commented Jun 21, 2023

Fixes #93

  • Strip redundant quotes to improve support for Python Markdown
  • Follow Python-Markdown's syntax to parse the title in double quotes and use all other tokens as classes
  • Added missing HTML roles as identified by #93 (removed after clarification in a comment below)

@codecov
Copy link

codecov bot commented Jun 21, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (3829c84) 91.25% compared to head (0673224) 92.68%.

Files Patch % Lines
mdit_py_plugins/admon/index.py 95.45% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #94      +/-   ##
==========================================
+ Coverage   91.25%   92.68%   +1.42%     
==========================================
  Files          31       31              
  Lines        1841     1817      -24     
==========================================
+ Hits         1680     1684       +4     
+ Misses        161      133      -28     
Flag Coverage Δ
pytests 92.68% <95.45%> (+1.42%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor Author

@KyleKing KyleKing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merged changes from #95

tests/fixtures/admon.md Show resolved Hide resolved
mdit_py_plugins/admon/index.py Show resolved Hide resolved
.coveragerc Show resolved Hide resolved
@KyleKing KyleKing changed the title fix(#93): strip outer quotes from admonition titles 👌 Expand support for Python-Markdown in the admon plugin Jun 22, 2023
@randomstuff
Copy link

Looks good to me. 👍

@KyleKing
Copy link
Contributor Author

KyleKing commented Aug 13, 2023

@chrisjsewell, this is a backward compatible change to resolve #93 that is ready for review when you have a chance

@KyleKing
Copy link
Contributor Author

Just bumping this PR! It is still ready for review/merge if there are no concerns

KyleKing added a commit to KyleKing/mdformat-admon that referenced this pull request Jan 10, 2024
@KyleKing
Copy link
Contributor Author

KyleKing commented Jan 10, 2024

A friendly bump! This PR is ready for review and merge.

@chrisjsewell, I would like to merge this PR when possible because I am working on adding support for a new subvariant of admonitions that would follow these changes (See KyleKing/mdformat-admon#14 and KyleKing/mdformat-admon#17 for Content Tabs)


Edit: the changes to support content tabs does not require changes to mdit-py-plugins 🥳. Content tabs are now supported in mdformat-admon>=1.1.0

This PR should still be merged because it makes a minor fix to the behavior of the admonitions plugin

Copy link
Member

@chrisjsewell chrisjsewell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks all good cheers!

@chrisjsewell chrisjsewell merged commit 867a77a into executablebooks:master Jan 11, 2024
12 checks passed
@KyleKing KyleKing deleted the fix-93-quoted-title branch January 12, 2024 00:22
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.

Admonition title syntax is not consistent with other implementation
3 participants