Releases: Byron/pulldown-cmark-to-cmark
v22.0.0
New Features
- Add #![deny(missing_docs)] attribute to enable missing documentation checks and add comprehensive documentation for all public items
New Features (BREAKING)
-
Add support for super/subscript without html
Superscript and subscript can be presented in markdown as:
^superscript^ andsubscriptrespectively. This is not always turned on,
and many people prefer the HTML tag form, however in order to round-trip
markdown which uses the symbolic form we need an option to enable that.This feature is enabled via a new field in the
Optionsstruct.
Commit Statistics
- 7 commits contributed to the release.
- 43 days passed between releases.
- 2 commits were understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
Commit Details
view details
- Uncategorized
- Merge pull request #107 from kinnison/super-sub-not-html (15e7a74)
- Refactor (aba929c)
- Add testing support for symbolic super/subscript (463b65a)
- Add support for super/subscript without html (ffa22b3)
- Merge pull request #108 from Byron/copilot/add-documentation-and-deny-attrs (077d5d0)
- Refactor (6d09f44)
- Add #![deny(missing_docs)] attribute to enable missing documentation checks and add comprehensive documentation for all public items (9b55c82)
v21.1.0
New Features
-
Improve CommonMark conformance testing output
This is a major improvement to the rendering of the failing
CommonMark conformance test output, that should make it easier
to read and understand when pulldown-cmark-to-cmark is producing
erroneous output.Additionally, this introduces a way to force the printing of the
CommonMark failure report from the command line:$ FULL_CMARK_RESULTS=true cargo testand documents in CONTRIBUTING.md that new contributors may want
to start with trying to improve conformance.This removes
#[should_panic]from the main CommonMark test. Instead,
we now hard-code in how many of the CommonMark tests are known to pass.If the number that actually passes increases or decreases, this test
will fail, informing the user either that they have introduced a bug
(decrease), or that they've successfully improved conformance (increase).Previously, if a change accidentally reduce the conformance, there was
no easy way to know, since that information was not stored/tracked
in any way.
Other
- Drop comment headers
Refactor
-
Add Repeated utility to simplify writing repeated content
-
Move and group related code
My impression reading through the code in this project is that
top-level statements have gotten a bit intertangled over time;
this tries to reorder things to have a clearer flow and
structure, grouping related things together.For example, this moves the recently added Error enum up above
all of the API functions, instead of leaving it somewhat
arbitrarily nestled betweencmark_resume_with_options()and
cmark_resume_one_event().No code changes were made to the body of functions or types.
This also does not change any of the public APIs, only where
code is located.-
Group padded newline logic at top of text_modifications.rs
-
Rename
padding_of()tolist_item_padding_of() -
Add 'Public API Functions' header in lib.rs
-
Consolidate public enum and struct types at the
top of lib.rs, instead of leaving them scattered
amongst thecmark*()public functions. -
Consolidate the two
impl State<'_>statements -
Move
cmark_resume(),cmark()andcmark_with_options()
from the bottom of lib.rs up to the top, before the ~600
implementation ofcmark_resume_one_event()that makes up
the bulk of lib.rs
-
-
Add State::set_minimum_newlines_before_start()
This should help with readability. As an example, I didn't realize
initially that all of theifstatements updated in this PR
were actually modifying the same field.But once I started doing the more generic refactoring of adding
aset_option_minimum()method, I looked at every line and
realized they were all the same.Factoring this to a method should clarify to future readers that
updating newlines_before_start specifically is a recurring operation. -
Use
write_padded_string()in a couple additional places
Additionally, while in the neighhborhood, addpub(crate)to the other
text_modifications.rs private helpersThese being marked as
pubis misleading since thetext_modifications
module is not actually externally public, and these functions
are never re-exported publicly.
Commit Statistics
- 12 commits contributed to the release.
- 264 days passed between releases.
- 6 commits were understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
Commit Details
view details
- Uncategorized
- Release pulldown-cmark-to-cmark v21.0.0 (d69f748)
- Merge pull request #104 from ConnorGray/connorgray/refactor-5 (bf34a3c)
- Add Repeated utility to simplify writing repeated content (942c42b)
- Merge pull request #103 from ConnorGray/connorgray/refactor-4 (3005f1b)
- Drop comment headers (5b93e7e)
- Move and group related code (30b706b)
- Merge pull request #102 from ConnorGray/connorgray/revamp-conformance-testing (3169307)
- Merge pull request #101 from ConnorGray/connorgray/refactor-3 (ac3aaec)
- Merge pull request #100 from ConnorGray/connorgray/refactor-2 (29c8c20)
- Improve CommonMark conformance testing output (91ffc95)
- Add State::set_minimum_newlines_before_start() (31a49d0)
- Use
write_padded_string()in a couple additional places (3ab278b)
v21.0.0
The breaking release is to avoid side-effects with different pulldown-cmark versions.
This crate now comes with version 13.
Other
- Adjust wording + typos
Refactor
-
Add helper to factor out newline + padding pattern
When writing a newline into the generated Markdown content
to start a new line of output, it is (almost) always necessary
to output the "padding" characters used to indent the content
at the current location in the document, based on the hierarchy
of block-level elements the output cursor is "inside" of.Since writing a newline and writing the current padding are
always paired, factoring them out into a function should help
with readability and consistency in performing this minor
two-step dance correctly.
Commit Statistics
- 8 commits contributed to the release.
- 6 days passed between releases.
- 2 commits were understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
Commit Details
view details
- Uncategorized
- Update changelog prior to release (475478a)
- Bump version to 21 for pulldown-cmark 13 (ed16be5)
- Merge pull request #99 from danieleades/cmark-13 (fb9bbd6)
- Merge pull request #98 from ConnorGray/connorgray/refactor-1 (b47d6c9)
- Update doc-string so
State::paddingis shown conventionally (e10010f) - Update to pulldown-cmark 13 (efbdd3a)
- Adjust wording + typos (05e247e)
- Add helper to factor out newline + padding pattern (2252ba1)
v20.0.1
Bug Fixes
- definition list block indentation now works correctly.
Commit Statistics
- 7 commits contributed to the release.
- 58 days passed between releases.
- 1 commit was understood as conventional.
- 1 unique issue was worked on: #97
Thanks Clippy
Clippy helped 1 time to make code idiomatic.
Commit Details
view details
- #97
- Definition list block indentation now works correctly. (27cbc16)
- Uncategorized
- Merge branch 'definition_list' (435307d)
- Thanks clippy (abb85a6)
- Treat definition list entries as blocks (261c23b)
- Merge pull request #96 from mgsloan/improve-naming-in-code-escaping-and-add-comments (1ffd7c8)
- Add comments explaining inline code escaping (60e1854)
- Improve naming in function for counting max consecutive chars (32628b3)
v20.0.0
Bug Fixes (BREAKING)
-
Add structured error handling for cmark(), cmark_resume() etc
Whencmark_resume_with_options(), which serves as basis for the other
cmark*functions, finds an inconsistent event stream (for example, two
consecutive heading start tags), it panics.Introduce a custom error type
Errorin the crate and change the return
type of all public functions fromfmt::Result<_>toResult<_, Error>.The next commit adds an integration test.
Commit Statistics
- 4 commits contributed to the release.
- 4 days passed between releases.
- 1 commit was understood as conventional.
- 1 unique issue was worked on: #91
Commit Details
v19.0.1
Bug Fixes
- harden again manufactured input which could previously trigger assertion failures.
Commit Statistics
- 3 commits contributed to the release.
- 19 days passed between releases.
- 1 commit was understood as conventional.
- 1 unique issue was worked on: #91
Commit Details
v19.0.0
New Features (BREAKING)
- Make
Statestruct non-exhaustive
That way, future additions to the rather internal state won't be a reason for breaking changes anymore.
Bug Fixes (BREAKING)
-
drasticly improve escaping
!,#, and|
Raises spec tests from 578 to 580. It handles cases that look like theseLink, not image: \ This header ends with hashes, not an ATX trailer ### ==================================================== | a \| b | a \| c | |--------|--------|
Commit Statistics
- 11 commits contributed to the release.
- 2 commits were understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
Commit Details
view details
- Uncategorized
- Merge pull request #90 from chriskrycho/escape-code-in-tables (daef56b)
- Add fixtures for pipes-in-code which should not be escaped (a85fe39)
- Use
Cow<'a, str>to minimize allocations for pipe escaping (022fa11) - Correct comment/note on when pipe characters are/not escaped (c9ecdd2)
- Make
Statestruct non-exhaustive (13785fe) - Improve test expectations for escaping pipes in inline code (e7f0784)
- Escape special characters in inline code in tables (37e8dcb)
- Add fixture for tables with escaped characters (edcac27)
- Minor improvements (f6fba5f)
- Merge branch 'notriddle/main' (4690885)
- Drasticly improve escaping
!,#, and|(76c24a1)
v18.0.0
Chore
- use
TextMergeStreamfor round-trip tests
This increases the amount of passing tests to 578.
It doesn't strictly improve the quality of implementation,
but since separate text events aren't supposed to be semantic,
these failures seem spurrious.
New Features
- angle brackets if link paren is unbalanced
Increases passing spec tests from 473 to 477.
Bug Fixes
- write block quote kind only once
New Features (BREAKING)
- correctly round-trip code blocks with no trailing newline
- round-trip indented code blocks
This raises the number of passing spec tests from 459 to 473.
Commit Statistics
- 10 commits contributed to the release.
- 40 days passed between releases.
- 5 commits were understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
Commit Details
view details
- Uncategorized
- Merge pull request #87 from notriddle/notriddle/link-tweaks (81ac29b)
- Use
TextMergeStreamfor round-trip tests (b3d7df2) - Angle brackets if link paren is unbalanced (d8f22c1)
- Merge branch 'blockquote-kinds' (d5323a8)
- Remove allocation (33ce10d)
- Write block quote kind only once (2f75de2)
- Merge branch 'notriddle/main' (848abc3)
- Run cargo fmt and assure it doesn't regress anymore. (3fdf308)
- Correctly round-trip code blocks with no trailing newline (db76794)
- Round-trip indented code blocks (8a9573d)
v17.0.0
New Features (BREAKING)
- retain more details on reference links
This raises the number of passing spec tests from 436 to 459.
Bug Fixes (BREAKING)
- spurrious code blocks when char escapes start text
Commit Statistics
- 5 commits contributed to the release.
- 14 days passed between releases.
- 2 commits were understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
Commit Details
v16.0.1
Other
-
Lower MSRV to 1.71.1
This project builds successfully with the MSRV ofpulldown-cmark. Therefore we can lowerrust-versionto 1.71.1.Add documentation for the current MSRV and that this project follows MSRV policy of
pulldown-cmark.Use
cargo hackfor MSRV CI job, to automatically install rustc according torust-versionand then executecargo check.
Commit Statistics
- 15 commits contributed to the release over the course of 2 calendar days.
- 2 days passed between releases.
- 1 commit was understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
Commit Details
view details
- Uncategorized
- Merge pull request #81 from caspermeijn/msrv (85ca9d4)
- Make clear that the rust-version field follows
pulldown-cmark's MSRV. (7269c4f) - Lower MSRV to 1.71.1 (21a7f26)
- Merge pull request #79 from danieleades/clippy (c6899bc)
- Use 'Self' keyword (clippy::use_self) (1a3029f)
- Remove unnecessary negation (clippy::if_not_else) (5745ce5)
- Remove unneeded 'ref' bindings (clippy::ref_binding_to_reference) (820b661)
- Nest or patterns (clippy::unnested_or_patterns) (43c6e8a)
- Explicitly match unit values (clippy::ignored_unit_patterns) (d636dc6)
- Avoid explicit iter loops (clippy::explicit_iter_loop) (a8c7fa5)
- Use inline format args (clippy::uninlined_format_args) (d97f8f5)
- Remove needless raw string hashes (clippy::needless_raw_string_hashes) (6e2ae15)
- Use semicolons if nothing returned (clippy::semicolon_if_nothing_returned) (8f9d4bf)
- Merge pull request #80 from danieleades/msrv (08ffcb8)
- Add MSRV check to CI (66b9ed2)