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

Can't make list of numbers #96

Open
infinitesteps opened this issue Jun 26, 2023 · 2 comments
Open

Can't make list of numbers #96

infinitesteps opened this issue Jun 26, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@infinitesteps
Copy link

Describe the bug
Can't create list of numeric items. Discovered when trying to list versions of software

To Reproduce

>>> from mdutils.mdutils import MdUtils
>>> mdf = MdUtils('foo.md', title='Foo')
>>> mdf.new_list(['foo', 'bar'])
>>> mdf.new_list(['1.2', '1.3'])
>>> mdf.create_md_file()

results:

Foo
===

- foo
- bar

1.2
1.3

Expected behavior

Foo
===

- foo
- bar

- 1.2
- 1.3

Desktop (please complete the following information):

  • macOS 12.6.5 (21G531)
  • Python 3.11.1
  • mdutils-1.6.0
@infinitesteps infinitesteps added the bug Something isn't working label Jun 26, 2023
@infinitesteps
Copy link
Author

For anyone else needing to work around this problem, prefix each items with a space

mdf.new_list(items=[' ' + v for v in versions])

@didix21 didix21 self-assigned this Jun 27, 2023
@didix21
Copy link
Owner

didix21 commented Jun 27, 2023

Thanks for reporting it, I'll take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants