-
Notifications
You must be signed in to change notification settings - Fork 360
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
GitHub Flavored Markdown and native SwiftUI rendering #152
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Render paragraphs * Update CI workflow
* Enable code coverage * Implement image loading * Render single-image paragraphs * Update workflows * Render paragraphs with multiple images and no text * Run swift format * Test image links in multi-image paragraphs
* Parse list nodes * Render numbered lists * Render bulleted lists * Render task lists
* Implement an inline content builder * Implement the markdown content builder * Implement list content builder * Make inline and block types internal
# Conflicts: # Package.resolved # Package.swift # Tests/MarkdownUITests/MarkdownTests.swift # Tests/MarkdownUITests/__Snapshots__/MarkdownTests/testBlockQuote.tvOS.png # Tests/MarkdownUITests/__Snapshots__/MarkdownTests/testBulletList.tvOS.png # Tests/MarkdownUITests/__Snapshots__/MarkdownTests/testCodeBlock.iOS.png # Tests/MarkdownUITests/__Snapshots__/MarkdownTests/testCodeBlock.tvOS.png # Tests/MarkdownUITests/__Snapshots__/MarkdownTests/testCodeBlockInsideList.iOS.png # Tests/MarkdownUITests/__Snapshots__/MarkdownTests/testCodeBlockInsideList.tvOS.png # Tests/MarkdownUITests/__Snapshots__/MarkdownTests/testHeadings.tvOS.png # Tests/MarkdownUITests/__Snapshots__/MarkdownTests/testHeadingsAndBlockQuotesInsideList.tvOS.png # Tests/MarkdownUITests/__Snapshots__/MarkdownTests/testInlines.iOS.png # Tests/MarkdownUITests/__Snapshots__/MarkdownTests/testInlines.tvOS.png # Tests/MarkdownUITests/__Snapshots__/MarkdownTests/testLinespacing.iOS.png # Tests/MarkdownUITests/__Snapshots__/MarkdownTests/testLinespacing.tvOS.png # Tests/MarkdownUITests/__Snapshots__/MarkdownTests/testListAndHeadingsInsideBlockQuotes.tvOS.png # Tests/MarkdownUITests/__Snapshots__/MarkdownTests/testMarkdownStyle.iOS.png # Tests/MarkdownUITests/__Snapshots__/MarkdownTests/testMarkdownStyle.tvOS.png # Tests/MarkdownUITests/__Snapshots__/MarkdownTests/testOpenCodeBlock.tvOS.png # Tests/MarkdownUITests/__Snapshots__/MarkdownTests/testOrderedList.tvOS.png # Tests/MarkdownUITests/__Snapshots__/MarkdownTests/testParagraph.tvOS.png # Tests/MarkdownUITests/__Snapshots__/MarkdownTests/testParagraphAndLineBreak.tvOS.png # Tests/MarkdownUITests/__Snapshots__/MarkdownTests/testRightToLeftParagraph.iOS.png # Tests/MarkdownUITests/__Snapshots__/MarkdownTests/testRightToLeftParagraph.tvOS.png # Tests/MarkdownUITests/__Snapshots__/MarkdownTests/testRightToLeftTrailingParagraph.iOS.png # Tests/MarkdownUITests/__Snapshots__/MarkdownTests/testRightToLeftTrailingParagraph.tvOS.png # Tests/MarkdownUITests/__Snapshots__/MarkdownTests/testTrailingParagraph.iOS.png # Tests/MarkdownUITests/__Snapshots__/MarkdownTests/testTrailingParagraph.tvOS.png # Tests/MarkdownUITests/__Snapshots__/MarkdownTests/testVerbatimHTML.tvOS.png
* Parse blockquote * Render blockquote
* Parse headings * Rename BlockSpacingModifier/Preference to BottomPadingModifier/Preference * Add TopPaddingModifier/Preference * Render headings * Add a single font heading style
Just droppin' in to provide moral support - This will be a game-changing PR ;) |
* Scale spacing preference relative to body * Scale spacing before preference relative to body * Make spacing and spacingBefore preferences optional * Refactor image, blockquote, paragraph and heading styles into a single type * Refactor list marker styles * Remove TaskListItemStyle * Refactor spaced sequence into its own view type * Rename default block style and code inline style * Refactor some block views into ApplyBlockStyle view
…k and the bottom spacing of its predecessor (#155)
* Parse thematic breaks * Render thematic breaks
* Parse code blocks * Render code blocks
* Parse tables * Render tables * Fix markdown content table test availability * Add table border style to theme * Add image flow spacing to theme * Add table rendering tests * Tweak perceptual precision in the markdown table snapshot tests
* Add FontStyle and Size * Polish FontStyle public API
* Update basic theme code block style * Add watchOS support
Closed
* Prevent some tests from running on iOS <16 * Add Swift Package Index manifest for documentation hosting * Add a new demo project * Add demo contents * Remove commented code * Set the GitHub theme as the default
* Text styles * Heading styles * More block styles * List marker styles * Table and thematic break styles * Adopt refactored styles * Code cleanup * Update sample code * Rename TextStyle protocol * Update sample code * Disable font properties test in tvOS
* Disambiguate size-related View methods * Update demo
* WIP * WIP * WIP * Disambiguate size-related View methods * Update demo * WIP * Rename `Size` to `RelativeSize` * WIP * WIP * WIP * WIP Fix relative URLs and heading anchor navigation * WIP * WIP
5605c2f
to
a538390
Compare
* Test header image * Update README * Update README
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
About
This pull request contains a rewrite of the library that brings the following features:
Breaking changes
MarkdownStyle
and all of its subtypes are no longer available. Use the newTheme
API to customize the Markdown appearance.MarkdownImageHandler
is no longer available. Use the newImageProvider
API to customize the image loading behavior.Status
Markdown rendering and styling:
Other stuff: