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

refactor: add tests, implement more markdown features, don't panic for unimplemented features #45

Merged
merged 3 commits into from
Sep 20, 2024

Conversation

joshka
Copy link
Owner

@joshka joshka commented Sep 19, 2024

Adds tests and refactors the code

The main change is removing the temporary line and just treating the last line in the text as the temporary line.
The second major change is moving to more stack based handling of styles, prefixes etc.
There is also much better logging, which will likely be tweaked for verbosity, but I'm finding it useful to use this for writing a test, reading the logs then implementing the changes to satisfy the test.

Items that are not yet implemented are ignored now rather than panicking.

@joshka joshka changed the title jm/add tests refactor: add tests, implement more markdown features, don't panic for unimplemented features Sep 20, 2024
@joshka joshka marked this pull request as ready for review September 20, 2024 06:53
@codecov-commenter
Copy link

codecov-commenter commented Sep 20, 2024

Codecov Report

Attention: Patch coverage is 76.47059% with 40 lines in your changes missing coverage. Please review.

Project coverage is 37.66%. Comparing base (c6341c1) to head (ea18ffc).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
tui-markdown/src/lib.rs 80.74% 31 Missing ⚠️
markdown-reader/src/main.rs 0.00% 5 Missing ⚠️
markdown-reader/src/app.rs 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            main      #45       +/-   ##
==========================================
+ Coverage   0.00%   37.66%   +37.66%     
==========================================
  Files          7        5        -2     
  Lines        492      446       -46     
==========================================
+ Hits           0      168      +168     
+ Misses       492      278      -214     

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

- Adds tests
- Removes the need for a temporary line (as the last line in the text
can be used)
- Properly handles the right number of linebreaks
- Handles lists properly
- ignores unimplemented features rather than panicking
@joshka joshka merged commit e0a2a19 into main Sep 20, 2024
11 checks passed
@joshka joshka deleted the jm/add-tests branch September 20, 2024 07:04
@github-actions github-actions bot mentioned this pull request Sep 20, 2024
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