diff --git a/CHANGELOG.md b/CHANGELOG.md index a350d0a..1b5d5c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,26 @@ ## Master -#### Breaking +### Changes - None -#### Enhancements -- None -#### Bug Fixes -- None +## 0.2.0 + +### Enhancements +- Add MarkdownCodeBlock +- Add MarkdownCollapsibleSection + + +## 0.1.2 + +### Changes +- Revert Blockquote formatting for proper rendering on GitHub.com + + +## 0.1.1 + +### Changes +- Remove Blockquote for empty lines ## 0.1.0 diff --git a/Docs/Reference/MarkdownGenerator/README.md b/Docs/Reference/MarkdownGenerator/README.md index 8dfff41..2f8acd2 100644 --- a/Docs/Reference/MarkdownGenerator/README.md +++ b/Docs/Reference/MarkdownGenerator/README.md @@ -9,6 +9,8 @@ Run `sourcedocs` in the repository root to update this documentation. ## Structs - [MarkdownBlockquotes](/Docs/Reference/MarkdownGenerator/structs/MarkdownBlockquotes.md) +- [MarkdownCodeBlock](/Docs/Reference/MarkdownGenerator/structs/MarkdownCodeBlock.md) +- [MarkdownCollapsibleSection](/Docs/Reference/MarkdownGenerator/structs/MarkdownCollapsibleSection.md) - [MarkdownFile](/Docs/Reference/MarkdownGenerator/structs/MarkdownFile.md) - [MarkdownHeader](/Docs/Reference/MarkdownGenerator/structs/MarkdownHeader.md) - [MarkdownImage](/Docs/Reference/MarkdownGenerator/structs/MarkdownImage.md) @@ -20,6 +22,7 @@ Run `sourcedocs` in the repository root to update this documentation. ## Enums +- [CodeBlockStyle](/Docs/Reference/MarkdownGenerator/enums/CodeBlockStyle.md) - [MarkdownListStyle](/Docs/Reference/MarkdownGenerator/enums/MarkdownListStyle.md) ## Extensions diff --git a/Docs/Reference/MarkdownGenerator/enums/CodeBlockStyle.md b/Docs/Reference/MarkdownGenerator/enums/CodeBlockStyle.md new file mode 100644 index 0000000..82aa4f8 --- /dev/null +++ b/Docs/Reference/MarkdownGenerator/enums/CodeBlockStyle.md @@ -0,0 +1,45 @@ +**ENUM** +# `CodeBlockStyle` + +**Contents** +- [Cases](#cases) + - `indented` + - `backticks` + +**Declaration** +```swift +public enum CodeBlockStyle +``` + + + +> Markdown format for the generated code block +> +> - indented: Code block is indented by 4-spaces +> - backticks: Code block is wrapped with ``` + +## Cases +### `indented` + +**Declaration** +```swift +case indented +``` + + + + + +### `backticks` + +**Declaration** +```swift +case backticks(language: String) +``` + + + + + + + diff --git a/Docs/Reference/MarkdownGenerator/extensions/String.md b/Docs/Reference/MarkdownGenerator/extensions/String.md index 10387eb..49822ad 100644 --- a/Docs/Reference/MarkdownGenerator/extensions/String.md +++ b/Docs/Reference/MarkdownGenerator/extensions/String.md @@ -13,3 +13,14 @@ public var markdown: String > Render a string of text as Markdown. No transformations applied. +### `removingConsecutiveBlankLines` + +**Declaration** +```swift +public var removingConsecutiveBlankLines: String +``` + + + +> Remove consecutive blank lines from a string output + diff --git a/Docs/Reference/MarkdownGenerator/structs/MarkdownCodeBlock.md b/Docs/Reference/MarkdownGenerator/structs/MarkdownCodeBlock.md new file mode 100644 index 0000000..9437d0c --- /dev/null +++ b/Docs/Reference/MarkdownGenerator/structs/MarkdownCodeBlock.md @@ -0,0 +1,42 @@ +**STRUCT** +# `MarkdownCodeBlock` + +**Contents** +- [Properties](#properties) + - `markdown` +- [Methods](#methods) + - `init(code:style:)` + +**Declaration** +```swift +public struct MarkdownCodeBlock: MarkdownConvertible +``` + + + + + +## Properties +### `markdown` + +**Declaration** +```swift +public var markdown: String +``` + + + +> Generated Markdown output + +## Methods +### `init(code:style:)` + +**Declaration** +```swift +public init(code: String, style: CodeBlockStyle = .indented) +``` + + + + + diff --git a/Docs/Reference/MarkdownGenerator/structs/MarkdownCollapsibleSection.md b/Docs/Reference/MarkdownGenerator/structs/MarkdownCollapsibleSection.md new file mode 100644 index 0000000..b988267 --- /dev/null +++ b/Docs/Reference/MarkdownGenerator/structs/MarkdownCollapsibleSection.md @@ -0,0 +1,42 @@ +**STRUCT** +# `MarkdownCollapsibleSection` + +**Contents** +- [Properties](#properties) + - `markdown` +- [Methods](#methods) + - `init(summary:details:)` + +**Declaration** +```swift +public struct MarkdownCollapsibleSection: MarkdownConvertible +``` + + + + + +## Properties +### `markdown` + +**Declaration** +```swift +public var markdown: String +``` + + + +> Generated Markdown output + +## Methods +### `init(summary:details:)` + +**Declaration** +```swift +public init(summary: String, details: MarkdownConvertible) +``` + + + + + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4dc695b --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +.PHONY: docs + +docs: + rm -rf Docs/Reference/MarkdownGenerator + sourcedocs --spm-module MarkdownGenerator +