Add support for alt-text in preformatted blocks #15

Merged
cadey merged 5 commits from :alt-text into main 2021-09-08 13:30:32 +00:00

5 Commits

Author SHA1 Message Date
Emi Tatsuo c49c76b5ad
Merge remote-tracking branch 'upstream/main' into alt-text
continuous-integration/drone/pr Build is passing Details
2020-12-15 09:09:22 -05:00
Emi Tatsuo 5a6208dedf
Fix dependant workspace members
continuous-integration/drone/pr Build encountered an error Details
2020-12-10 11:53:57 -05:00
Emi Tatsuo 3dadcc05ba
Merge remote-tracking branch 'upstream/main' into alt-text
continuous-integration/drone/pr Build is passing Details
2020-12-10 11:04:22 -05:00
Emii Tatsuo 9bc2ea1159
Fix bug with type inferring for the `preformatted()` method
continuous-integration/drone/pr Build encountered an error Details
2020-11-30 14:17:13 -05:00
Emii Tatsuo 4c86fbba1e
Add support for alt-text in preformatted blocks ⚠️
continuous-integration/drone/pr Build is failing Details
⚠️  Breaking Change ⚠️

This adds support for parsing and rendering alt-text in preformatted blocks.  This changes the public API both around the `Node` enum and the `preformatted()` method of the builder.  I cannot think of a way to avoid this that is not needlessly overcomplicated, except maybe merging the preformatted & body into a single newline delimited string but that's hella gross and i don't think anyone wants that.  Lemme know if you can think of a better way of doing this

Preformatted blocks without alt text can still be created by passing in an empty string.  Because alt text isn't separated by a space, this does not add any unnecessary padding.  I chose not to accept Option<String> here because an empty string serves the same function but encourages users to use alt-text in their documents, which is very important for increasing accessibility.
2020-11-30 14:05:12 -05:00