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

utils: html: Normalize misaka extensions #686

Merged
merged 1 commit into from
Jan 5, 2022

Conversation

ix5
Copy link
Member

@ix5 ix5 commented Jan 17, 2021

As of version 0.12.2, Isso uses misaka 2.0 to render markdown. Misaka 2.0 uses dashed-case instead of snake_case for options.

Normalize passed extensions to dashed-case to avoid mistakes.

Note: Flags have only been around in Isso with misaka 2.0, so I hope users did not use dashed case with them.

isso/utils/html.py Outdated Show resolved Hide resolved
@ix5 ix5 force-pushed the extensions-normalize branch 2 times, most recently from 55b14ed to c64c630 Compare January 18, 2021 09:46
@ix5 ix5 changed the title [WIP] utils: html: Normalize misaka extensions utils: html: Normalize misaka extensions Jan 18, 2021
@ix5 ix5 marked this pull request as ready for review January 18, 2021 09:46
@ix5
Copy link
Member Author

ix5 commented Jan 18, 2021

make coverage
nosetests --with-doctest --with-coverage --cover-package=isso --cover-html isso/
................................................................................
Name                        Stmts   Miss  Cover
-----------------------------------------------
isso/__init__.py              164     70    57%
isso/config.py                 77     11    86%
isso/core.py                   68     20    71%
isso/db/__init__.py            66      6    91%
isso/db/comments.py           135     20    85%
isso/db/preferences.py         17      0   100%
isso/db/spam.py                36      0   100%
isso/db/threads.py             15      1    93%
isso/dispatch.py               39     23    41%
isso/ext/__init__.py           10      0   100%
isso/ext/notifications.py     150    100    33%
isso/migrate.py               201     27    87%
isso/run.py                     5      0   100%
isso/utils/__init__.py         75     16    79%
isso/utils/hash.py             67      8    88%
isso/utils/html.py             51      1    98%
isso/utils/http.py             39     25    36%
isso/utils/parse.py            43      2    95%
isso/views/__init__.py         36      8    78%
isso/views/comments.py        460    129    72%
isso/wsgi.py                  103     26    75%
-----------------------------------------------
TOTAL                        1857    493    73%
----------------------------------------------------------------------
Ran 80 tests in 9.088s

OK

@ix5 ix5 force-pushed the extensions-normalize branch from 97eb7fe to 33dec87 Compare December 24, 2021 00:54
@ix5
Copy link
Member Author

ix5 commented Dec 24, 2021

Rebased and re-tested on Python 3.10

As of version 0.12.2, Isso uses misaka 2.0 to render
markdown. Misaka 2.0 uses `dashed-case` instead of
`snake_case` for options.

Normalize passed extensions to dashed-case to avoid
mistakes.

Note: Flags have only been around in Isso with misaka 2.0,
so I hope users did not use dashed case with them.
@ix5 ix5 force-pushed the extensions-normalize branch from 33dec87 to ffcdfcf Compare December 26, 2021 20:27
ix5 added a commit to ix5/isso that referenced this pull request Jan 5, 2022
As of version 0.12.2, Isso uses misaka 2.0 to render
markdown. Misaka 2.0 uses `dashed-case` instead of
`snake_case` for options.

Normalize passed extensions to dashed-case to avoid
mistakes.

Note: Flags have only been around in Isso with misaka 2.0,
so I hope users did not use dashed case with them.
@ix5
Copy link
Member Author

ix5 commented Jan 5, 2022

@jelmer do you have a preference for merge style? I tried doing your style which I think consists of cherry-picking and manually editing the title to add the PR number, see https://github.com/ix5/isso/tree/extensions-normalize-686

@jelmer
Copy link
Member

jelmer commented Jan 5, 2022

I generally just use Squash and merge in the GitHub UI unless there's a good reason to keep the individual commits around.

@ix5 ix5 merged commit 86fbf37 into isso-comments:master Jan 5, 2022
@ix5 ix5 deleted the extensions-normalize branch January 5, 2022 20:17
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.

3 participants