executablebooks / .github

Community health files: Contributing guidelines, Code of Conduct, ...
MIT License
4 stars 8 forks source link

code block renders differently after formatting #21

Closed jnnnnn closed 2 years ago

jnnnnn commented 2 years ago

Describe the problem

The following markdown triggers an error about rendering differently in version 1.1.0 on Windows:

```~/.gitconfig
[user]


I know this is pretty weird markdown (I wrote it by mistake), 
but it was buried in a 20,000 line file and prevents the entire file from being formatted.

### Link to your repository or website

_No response_

### Steps to reproduce

Save the above code block in a file and run mdformat on it. 

### The version of Python you're using

3.9.5

### Your operating system

Windows 10

### Versions of your packages

alabaster==0.7.12
anyio==3.3.0
appdirs==1.4.4
argon2-cffi==20.1.0
arrow==1.0.3
attrs==20.3.0
autopep8==1.5.7
Babel==2.9.1
backcall==0.2.0
beautifulsoup4==4.9.3
binaryornot==0.4.4
bitarray==2.3.4
black==20.8b1
bleach==4.1.0
bottle==0.12.19
bs4==0.0.1
cachetools==4.2.1
certifi==2020.12.5
cffi==1.14.5
chardet==3.0.4
click==7.1.2
colorama==0.4.4
conan==1.28.2
conan-package-tools==0.34.4
cookiecutter==1.7.3
cryptography==3.4.7
datadog==0.41.0
debugpy==1.4.1
decorator==4.4.2
defusedxml==0.7.1
Deprecated==1.2.12
deprecation==2.0.7
distro==1.1.0
docutils==0.16
entrypoints==0.3
fasteners==0.16
future==0.18.2
gitdb==4.0.7
GitPython==3.1.14
google-api-core==1.26.3
google-api-python-client==2.1.0
google-auth==1.28.0
google-auth-httplib2==0.1.0
google-auth-oauthlib==0.4.4
googleapis-common-protos==1.53.0
greenlet==1.1.1
grpcio==1.37.0
grpcio-tools==1.37.0
httplib2==0.19.1
idna==2.10
imagesize==1.2.0
importlib-metadata==4.7.1
ipykernel==6.2.0
ipython==7.29.0
ipython-genutils==0.2.0
ipywidgets==7.6.3
iress-ci-utils==0.72.0
iress-conan-utils==5.64.0
iress-package-tools==1.2.23
iress-sdo-cpp==3.1.333.0
javaproperties==0.8.0
jedi==0.18.0
Jinja2==2.11.3
jinja2-time==0.2.0
json5==0.9.6
jsonschema==3.2.0
jupyter-book==0.11.3
jupyter-cache==0.4.3
jupyter-client==7.0.1
jupyter-core==4.7.1
jupyter-server==1.10.2
jupyter-server-mathjax==0.2.3
jupyter-sphinx==0.3.2
jupyterlab-widgets==1.0.0
jupytext==1.10.3
latexcodec==2.0.1
linkify-it-py==1.0.1
lxml==4.6.4
markdown-it-py==1.1.0
MarkupSafe==1.1.1
matplotlib-inline==0.1.2
mdformat==0.7.10
mdit-py-plugins==0.2.6
mercurial==5.9.1
mistune==0.8.4
msedge-selenium-tools==3.141.3
mypy-extensions==0.4.3
myst-nb==0.12.3
myst-parser==0.13.7
nbclient==0.5.4
nbconvert==5.6.1
nbdime==3.1.0
nbformat==5.1.3
nest-asyncio==1.5.1
networkx==2.5.1
node-semver==0.6.1
notebook==6.4.3
numpy==1.21.4
oauth2client==4.1.3
oauthlib==3.1.0
packaging==20.9
pandocfilters==1.4.3
parso==0.8.2
patch-ng==1.17.4
pathspec==0.8.1
pefile==2019.4.18
-e git+https://github.com/alex-nitrokey/python-pgpdump@196f48e7a48cff9d7ade2d7c32bf6186b5a6fc34#egg=pgpdump3
pickleshare==0.7.5
pluginbase==1.0.0
poyo==0.5.0
prometheus-client==0.11.0
prompt-toolkit==3.0.18
protobuf==3.15.7
psutil==5.8.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pybtex==0.24.0
pybtex-docutils==1.0.1
pycodestyle==2.7.0
pycparser==2.20
pycryptodome==3.11.0
pydata-sphinx-theme==0.6.3
pydot==1.4.2
pyftpdlib==1.5.6
PyGithub==1.54.0.1
Pygments==2.8.1
PyIressTest==21.11.905
PyJWT==1.7.1
pyodbc==4.0.30
pyparsing==2.4.7
pyrsistent==0.18.0
python-dateutil==2.8.2
python-slugify==5.0.2
pytz==2021.3
pywin32==301
pywinpty==1.1.3
PyYAML==5.4.1
pyzmq==22.2.1
quick-jira==0.1.6
regex==2021.4.4
requests==2.24.0
requests-oauthlib==1.3.0
requests-unixsocket==0.2.0
rsa==4.7.2
selenium==3.141.0
Send2Trash==1.8.0
six==1.14.0
smmap==4.0.0
sniffio==1.2.0
snowballstemmer==2.1.0
soupsieve==2.2.1
Sphinx==3.5.4
sphinx-book-theme==0.1.3
sphinx-comments==0.0.3
sphinx-copybutton==0.4.0
sphinx-external-toc==0.2.3
sphinx-jupyterbook-latex==0.4.2
sphinx-multitoc-numbering==0.1.3
sphinx-panels==0.5.2
sphinx-thebe==0.0.10
sphinx-togglebutton==0.2.3
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-bibtex==2.2.1
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
SQLAlchemy==1.4.23
suds-ijurko==0.601
tabulate==0.8.9
tempdir-ro==0.1.6
terminado==0.11.1
testpath==0.5.0
text-unidecode==1.3
toml==0.10.2
tomli==1.2.2
tornado==6.1
tqdm==4.60.0
traitlets==5.0.5
typed-ast==1.4.3
typing-extensions==3.7.4.3
uc-micro-py==1.0.1
uritemplate==3.0.1
urllib3==1.25.11
wcwidth==0.2.5
wealthti-protos==2.2.0
webencodings==0.5.1
websocket-client==1.2.1
websockets==8.1
widgetsnbextension==3.5.1
wrapt==1.12.1
xkcdpass==1.17.6
zipp==3.5.0

### Additional context

_No response_
welcome[bot] commented 2 years ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

hukkin commented 2 years ago

Thanks for the issue!

Can confirm this is a bug. The fix is here https://github.com/executablebooks/mdformat/pull/282 and will be included in the next release.