Skip to content

Conversation

@rob-blackbourn
Copy link
Contributor

Great package!

I'd like write an extension for markdown using this package.

Extensions for the markdown package take an xml...Element. This package provides an Element as an intermediate step, before converting it to a string with the convert function.

This pull request splits out the element conversion stage to a function called convert_to_element, and changes convert to call convert_to_element. I have also added a parent argument, to allow simple insertion of the element into an xml
tree if required.

I also added a py.typed file, to allow the types to be visible PEP 561, and put the .vscode folder in the .gitignore.

@roniemartinez
Copy link
Owner

Thanks a lot for your PR! 🙌

Could you also add tests?

py.typed

Does this not require update to the pyproject.toml?

@rob-blackbourn
Copy link
Contributor Author

I've added a test to check for element generation, and generation as a child of a parent element.

You don't need to make any changes to the pyproject.toml for py.typed. I ran poetry build and inspected the tar file, and I can see py.typed exists. I use poetry in my projects and I see this behaviour.

@codecov
Copy link

codecov bot commented Dec 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (99c7e59) 100.00% compared to head (490425f) 100.00%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #431   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            7         7           
  Lines          938       943    +5     
=========================================
+ Hits           938       943    +5     

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

@roniemartinez
Copy link
Owner

Thanks @rob-blackbourn

@roniemartinez roniemartinez merged commit fa2c722 into roniemartinez:master Dec 6, 2023
@roniemartinez
Copy link
Owner

@all-contributors please add @rob-blackbourn for code

@allcontributors
Copy link
Contributor

@roniemartinez

I've put up a pull request to add @rob-blackbourn! 🎉

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