From c292db908e7a10ef5e5d13afafb13ef618248c6c Mon Sep 17 00:00:00 2001 From: Christopher de Haan Date: Sun, 26 Jun 2022 19:22:08 +0100 Subject: [PATCH] Add Swift 5.6 Support (#35) * feat(platform): Swift 5.3 through 5.6 support * chore(ci): Update * chore(ci): Update --- .github/PULL_REQUEST_TEMPLATE.md | 12 +- .github/workflows/ci.yml | 217 ++++++++++++++++++ .swiftlint.yml | 1 + .travis.yml | 59 ----- CDMarkdownKit.podspec | 4 +- CDMarkdownKit.xcodeproj/project.pbxproj | 46 ++-- .../xcschemes/CDMarkdownKit iOS.xcscheme | 6 +- .../xcschemes/CDMarkdownKit macOS.xcscheme | 6 +- .../xcschemes/CDMarkdownKit tvOS.xcscheme | 6 +- .../xcschemes/CDMarkdownKit watchOS.xcscheme | 6 +- CHANGELOG.md | 22 +- CONTRIBUTING.md | 32 +-- {.github => Documentation}/cdmarkdownkit.png | Bin {.github => Documentation}/github.png | Bin {.github => Documentation}/stackoverflow.png | Bin .../Base.lproj/LaunchScreen.storyboard | 23 +- Example/Source/AppDelegate.swift | 2 +- Example/Source/BaseViewController.swift | 2 +- Example/Source/CodeLabelViewController.swift | 2 +- Example/Source/CodeTextViewController.swift | 2 +- .../StoryboardLabelViewController.swift | 2 +- .../Source/StoryboardTextViewController.swift | 2 +- Example/iOS Example.xcodeproj/project.pbxproj | 18 +- .../xcschemes/iOS Example.xcscheme | 2 +- LICENSE | 2 +- Package.swift | 12 +- Package@swift-5.3.swift | 53 +++++ Package@swift-5.4.swift | 53 +++++ Package@swift-5.5.swift | 54 +++++ README.md | 48 ++-- Source/CDAttributedStringKey.swift | 2 +- Source/CDColor+CDMarkdownKit.swift | 2 +- Source/CDColor.swift | 2 +- Source/CDFont+CDMarkdownKit.swift | 2 +- Source/CDFont.swift | 2 +- Source/CDImage+CDMarkdownKit.swift | 2 +- Source/CDImage.swift | 2 +- Source/CDMarkdownAutomaticLink.swift | 2 +- Source/CDMarkdownBold.swift | 2 +- Source/CDMarkdownCode.swift | 2 +- Source/CDMarkdownCodeEscaping.swift | 2 +- Source/CDMarkdownCommonElement.swift | 2 +- Source/CDMarkdownElement.swift | 2 +- Source/CDMarkdownEscaping.swift | 2 +- Source/CDMarkdownHeader.swift | 2 +- Source/CDMarkdownImage.swift | 2 +- Source/CDMarkdownItalic.swift | 2 +- .../{CDMarkdownKit.h => CDMarkdownKit.swift} | 17 +- Source/CDMarkdownLabel.swift | 4 +- Source/CDMarkdownLayoutManager.swift | 2 +- Source/CDMarkdownLevelElement.swift | 2 +- Source/CDMarkdownLink.swift | 2 +- Source/CDMarkdownLinkElement.swift | 2 +- Source/CDMarkdownList.swift | 2 +- Source/CDMarkdownParser.swift | 2 +- Source/CDMarkdownQuote.swift | 2 +- Source/CDMarkdownStyle.swift | 2 +- Source/CDMarkdownSyntax.swift | 2 +- Source/CDMarkdownTextView.swift | 2 +- Source/CDMarkdownUnescaping.swift | 2 +- Source/Dictionary+CDMarkdownKit.swift | 2 +- Source/NSAttributedString+CDMarkdownKit.swift | 2 +- ...utableAttributedString+CDMarkdownKit.swift | 2 +- .../NSTextCheckingResult+CDMarkdownKit.swift | 2 +- Source/NSTextStorage+CDMarkdownKit.swift | 2 +- Source/String+CDMarkdownKit.swift | 2 +- 66 files changed, 552 insertions(+), 231 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml rename {.github => Documentation}/cdmarkdownkit.png (100%) rename {.github => Documentation}/github.png (100%) rename {.github => Documentation}/stackoverflow.png (100%) create mode 100644 Package@swift-5.3.swift create mode 100644 Package@swift-5.4.swift create mode 100644 Package@swift-5.5.swift rename Source/{CDMarkdownKit.h => CDMarkdownKit.swift} (71%) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 4310861..6e04c37 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,13 +1,13 @@ ### Issue Link :link: -> What issue does this fix? If an issue doesn't exist, remove this section. + ### Goals :soccer: -> List the high-level objectives of this pull request. -> Include any relevant context. + + ### Implementation Details :construction: -> Explain the reasoning behind any architectural changes. -> Highlight any new functionality. + + ### Testing Details :mag: -> Describe what tests you've added for your changes. + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7c4ff50 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,217 @@ +name: "CDMarkdownKit CI" + +on: + push: + branches: + - master + paths: + - "Source/**" + - ".github/workflows/**" + - "Package.swift" + pull_request: + paths: + - "Source/**" + - ".github/workflows/**" + - "Package.swift" + +concurrency: + group: ci + cancel-in-progress: true +jobs: + Latest: + name: Test Latest (iOS, macOS, tvOS, watchOS) + runs-on: macOS-12 + env: + DEVELOPER_DIR: "/Applications/Xcode_13.4.1.app/Contents/Developer" + timeout-minutes: 10 + strategy: + fail-fast: false + matrix: + include: + - name: "iOS" + destination: "OS=15.5,name=iPhone 13 Pro" + - name: "macOS" + destination: "platform=macOS" + - name: "tvOS" + destination: "OS=15.4,name=Apple TV" + - name: "watchOS" + destination: "OS=8.5,name=Apple Watch Series 7 - 45mm" + steps: + - uses: actions/checkout@v3 + - name: ${{ matrix.name }} - Debug + run: | + set -o pipefail + env NSUnbufferedIO=YES xcodebuild -project "CDMarkdownKit.xcodeproj" -scheme "CDMarkdownKit ${{ matrix.name }}" -destination "${{ matrix.destination }}" -configuration Debug clean build | xcpretty + - name: ${{ matrix.name }} - Release + run: | + set -o pipefail + env NSUnbufferedIO=YES xcodebuild -project "CDMarkdownKit.xcodeproj" -scheme "CDMarkdownKit ${{ matrix.name }}" -destination "${{ matrix.destination }}" -configuration Release clean build | xcpretty + Catalyst: + name: Test Catalyst + runs-on: macOS-12 + env: + DEVELOPER_DIR: "/Applications/Xcode_13.4.app/Contents/Developer" + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + - name: Catalyst - Debug + run: | + set -o pipefail + env NSUnbufferedIO=YES xcodebuild -project "CDMarkdownKit.xcodeproj" -scheme "CDMarkdownKit iOS" -destination "platform=macOS" -configuration Debug clean build | xcpretty + - name: Catalyst - Release + run: | + set -o pipefail + env NSUnbufferedIO=YES xcodebuild -project "CDMarkdownKit.xcodeproj" -scheme "CDMarkdownKit iOS" -destination "platform=macOS" -configuration Release clean build | xcpretty + iOS: + name: Test iOS + runs-on: macOS-11 + env: + DEVELOPER_DIR: "/Applications/Xcode_12.5.1.app/Contents/Developer" + timeout-minutes: 20 + strategy: + fail-fast: false + matrix: + include: + - name: "iOS 14.5" + destination: "OS=14.5,name=iPhone 12 Pro" + steps: + - uses: actions/checkout@v3 + - uses: actions/cache@v3 + with: + path: Pods + key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} + restore-keys: | + ${{ runner.os }}-pods- + - name: ${{ matrix.name }} - Debug + run: | + set -o pipefail + env NSUnbufferedIO=YES xcodebuild -project "CDMarkdownKit.xcodeproj" -scheme "CDMarkdownKit iOS" -destination "${{ matrix.destination }}" -configuration Debug clean build | xcpretty + - name: ${{ matrix.name }} - Release + run: | + set -o pipefail + env NSUnbufferedIO=YES xcodebuild -project "CDMarkdownKit.xcodeproj" -scheme "CDMarkdownKit iOS" -destination "${{ matrix.destination }}" -configuration Release clean build | xcpretty + - name: Pod Lib Lint + run: | + gem install cocoapods --no-document --quiet + pod lib lint --allow-warnings --use-libraries + macOS: + name: Test macOS + runs-on: ${{ matrix.runsOn }} + env: + DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}/Contents/Developer" + timeout-minutes: 10 + strategy: + fail-fast: false + matrix: + include: + - runsOn: macOS-12 + xcode: "Xcode_13.4.1.app" + name: "macOS 12, Xcode 13.4.1, Swift 5.6.1" + - runsOn: macOS-12 + xcode: "Xcode_13.3.1.app" + name: "macOS 12, Xcode 13.3.1, Swift 5.6" + - runsOn: macOS-11 + xcode: "Xcode_13.2.1.app" + name: "macOS 11, Xcode 13.2.1, Swift 5.5.2" + - runsOn: macOS-11 + xcode: "Xcode_13.1.app" + name: "macOS 11, Xcode 13.1, Swift 5.5.1" + - runsOn: macOS-11 + xcode: "Xcode_13.0.app" + name: "macOS 11, Xcode 13.0, Swift 5.5.0" + - runsOn: macOS-11 + xcode: "Xcode_12.5.1.app" + name: "macOS 11, Xcode 12.5.1, Swift 5.4" + - runsOn: macOS-10.15 + xcode: "Xcode_12.4.app" + name: "macOS 10.15, Xcode 12.4, Swift 5.3" + steps: + - uses: actions/checkout@v3 + - name: ${{ matrix.name }} - Debug + run: | + set -o pipefail + env NSUnbufferedIO=YES xcodebuild -project "CDMarkdownKit.xcodeproj" -scheme "CDMarkdownKit macOS" -destination "platform=macOS" -configuration Debug clean build | xcpretty + - name: ${{ matrix.name }} - Release + run: | + set -o pipefail + env NSUnbufferedIO=YES xcodebuild -project "CDMarkdownKit.xcodeproj" -scheme "CDMarkdownKit macOS" -destination "platform=macOS" -configuration Release clean build | xcpretty + tvOS: + name: Test tvOS + runs-on: macOS-11 + env: + DEVELOPER_DIR: "/Applications/Xcode_12.5.1.app/Contents/Developer" + timeout-minutes: 10 + strategy: + fail-fast: false + matrix: + include: + - name: "tvOS 14.5" + destination: "OS=14.5,name=Apple TV" + steps: + - uses: actions/checkout@v3 + - name: ${{ matrix.name }} - Debug + run: | + set -o pipefail + env NSUnbufferedIO=YES xcodebuild -project "CDMarkdownKit.xcodeproj" -scheme "CDMarkdownKit tvOS" -destination "${{ matrix.destination }}" -configuration Debug clean build | xcpretty + - name: ${{ matrix.name }} - Release + run: | + set -o pipefail + env NSUnbufferedIO=YES xcodebuild -project "CDMarkdownKit.xcodeproj" -scheme "CDMarkdownKit tvOS" -destination "${{ matrix.destination }}" -configuration Release clean build | xcpretty + watchOS: + name: Test watchOS + runs-on: macOS-11 + env: + DEVELOPER_DIR: "/Applications/Xcode_12.5.1.app/Contents/Developer" + timeout-minutes: 10 + strategy: + fail-fast: false + matrix: + include: + - name: "watchOS 7.4" + destination: "OS=7.4,name=Apple Watch Series 6 - 44mm" + + steps: + - uses: actions/checkout@v3 + - name: ${{ matrix.name }} - Debug + run: | + set -o pipefail + env NSUnbufferedIO=YES xcodebuild -project "CDMarkdownKit.xcodeproj" -scheme "CDMarkdownKit watchOS" -destination "${{ matrix.destination }}" -configuration Debug clean build | xcpretty + - name: ${{ matrix.name }} - Release + run: | + set -o pipefail + env NSUnbufferedIO=YES xcodebuild -project "CDMarkdownKit.xcodeproj" -scheme "CDMarkdownKit watchOS" -destination "${{ matrix.destination }}" -configuration Release clean build | xcpretty + SPM: + name: Test with SPM + runs-on: ${{ matrix.runsOn }} + env: + DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}/Contents/Developer" + timeout-minutes: 10 + strategy: + fail-fast: false + matrix: + include: + - xcode: "Xcode_13.4.app" + runsOn: macOS-12 + name: "macOS 12, SPM 5.6.1 Build" + - xcode: "Xcode_13.3.1.app" + runsOn: macOS-12 + name: "macOS 12, SPM 5.6 Build" + - xcode: "Xcode_13.2.1.app" + runsOn: macOS-11 + name: "macOS 11, SPM 5.5.2 Build" + - xcode: "Xcode_13.1.app" + runsOn: macOS-11 + name: "macOS 11, SPM 5.5.1 Build" + - xcode: "Xcode_13.0.app" + runsOn: macOS-11 + name: "macOS 11, SPM 5.5 Test" + - xcode: "Xcode_12.5.1.app" + runsOn: macOS-11 + name: "macOS 11, SPM 5.4 Build" + - xcode: "Xcode_12.4.app" + runsOn: macOS-10.15 + name: "macOS 10.15, SPM 5.3 Build" + steps: + - uses: actions/checkout@v3 + - name: ${{ matrix.name }} + run: swift build -c debug diff --git a/.swiftlint.yml b/.swiftlint.yml index bf02223..1411091 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -2,6 +2,7 @@ included: # paths to include during linting. `--path` is ignored if present. - Source - Example/Source +# configurable rules can be customized from this configuration file. # number of lines allowed in a file file_length: 405 # number of lines allowed in a function diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2796a24..0000000 --- a/.travis.yml +++ /dev/null @@ -1,59 +0,0 @@ -os: osx -osx_image: xcode11.6 -branches: - only: - - master -env: - global: - - LC_CTYPE=en_US.UTF-8 - - LANG=en_US.UTF-8 - - WORKSPACE=CDMarkdownKit.xcworkspace - - IOS_FRAMEWORK_SCHEME="CDMarkdownKit iOS" - - MACOS_FRAMEWORK_SCHEME="CDMarkdownKit macOS" - - TVOS_FRAMEWORK_SCHEME="CDMarkdownKit tvOS" - - WATCHOS_FRAMEWORK_SCHEME="CDMarkdownKit watchOS" - - EXAMPLE_SCHEME="iOS Example" - matrix: - - DESTINATION="OS=6.2.1,name=Apple Watch Series 5 - 44mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="OS=5.3,name=Apple Watch Series 4 - 44mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="OS=4.2,name=Apple Watch Series 3 - 42mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="OS=3.2,name=Apple Watch Series 2 - 42mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - - - DESTINATION="OS=13.6,name=iPhone 11" SCHEME="$IOS_FRAMEWORK_SCHEME" BUILD_FRAMEWORK="NO" BUILD_EXAMPLE="YES" POD_LINT="NO" - - DESTINATION="OS=12.4,name=iPhone X" SCHEME="$IOS_FRAMEWORK_SCHEME" BUILD_FRAMEWORK="NO" BUILD_EXAMPLE="YES" POD_LINT="NO" - - DESTINATION="OS=11.4,name=iPhone 8" SCHEME="$IOS_FRAMEWORK_SCHEME" BUILD_FRAMEWORK="NO" BUILD_EXAMPLE="YES" POD_LINT="NO" - - DESTINATION="OS=10.3.1,name=iPhone 7" SCHEME="$IOS_FRAMEWORK_SCHEME" BUILD_FRAMEWORK="NO" BUILD_EXAMPLE="YES" POD_LINT="NO" - - - DESTINATION="OS=13.4,name=Apple TV 4K (at 1080p)" SCHEME="$TVOS_FRAMEWORK_SCHEME" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="OS=12.4,name=Apple TV 4K (at 1080p)" SCHEME="$TVOS_FRAMEWORK_SCHEME" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="OS=11.4,name=Apple TV 4K" SCHEME="$TVOS_FRAMEWORK_SCHEME" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="OS=10.2,name=Apple TV" SCHEME="$TVOS_FRAMEWORK_SCHEME" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - - - DESTINATION="arch=x86_64" SCHEME="$MACOS_FRAMEWORK_SCHEME" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO" POD_LINT="YES" -before_install: - - gem install cocoapods --no-document --quiet -script: - - set -o pipefail - - xcodebuild -version - - xcodebuild -showsdks - - # Build Framework in Debug if specified - - if [ $BUILD_FRAMEWORK == "YES" ]; then - xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty; - fi - - # Build Framework in Release if specified - - if [ $BUILD_FRAMEWORK == "YES" ]; then - xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty; - fi - - # Build Example in Debug if specified - - if [ $BUILD_EXAMPLE == "YES" ]; then - xcodebuild -workspace "$WORKSPACE" -scheme "$EXAMPLE_SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty; - fi - - # Run `pod lib lint` if specified - - if [ $POD_LINT == "YES" ]; then - pod lib lint --allow-warnings --use-libraries; - fi - diff --git a/CDMarkdownKit.podspec b/CDMarkdownKit.podspec index d9e6ae7..b43cd04 100644 --- a/CDMarkdownKit.podspec +++ b/CDMarkdownKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'CDMarkdownKit' - s.version = '2.1.1' + s.version = '2.2.0' s.license = { :type => 'MIT', :file => 'LICENSE' } s.summary = 'An extensive Swift framework providing simple and customizable markdown parsing.' s.description = <<-DESC @@ -15,7 +15,7 @@ Pod::Spec.new do |s| s.tvos.deployment_target = '10.0' s.watchos.deployment_target = '3.0' - s.swift_versions = ['5.1', '5.2'] + s.swift_versions = ['5.3', '5.4', '5.5'] s.source_files = 'Source/*.swift' end diff --git a/CDMarkdownKit.xcodeproj/project.pbxproj b/CDMarkdownKit.xcodeproj/project.pbxproj index 34b187f..fd098bf 100644 --- a/CDMarkdownKit.xcodeproj/project.pbxproj +++ b/CDMarkdownKit.xcodeproj/project.pbxproj @@ -43,13 +43,14 @@ B255AD8720D8000A00E8044D /* CDAttributedStringKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = B255AD8520D8000A00E8044D /* CDAttributedStringKey.swift */; }; B255AD8820D8000A00E8044D /* CDAttributedStringKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = B255AD8520D8000A00E8044D /* CDAttributedStringKey.swift */; }; B255AD8920D8000A00E8044D /* CDAttributedStringKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = B255AD8520D8000A00E8044D /* CDAttributedStringKey.swift */; }; + B267903A2868AC0E00DFAAA5 /* CDMarkdownKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = B26790392868AC0E00DFAAA5 /* CDMarkdownKit.swift */; }; + B267903B2868AC0E00DFAAA5 /* CDMarkdownKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = B26790392868AC0E00DFAAA5 /* CDMarkdownKit.swift */; }; + B267903C2868AC0E00DFAAA5 /* CDMarkdownKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = B26790392868AC0E00DFAAA5 /* CDMarkdownKit.swift */; }; + B267903D2868AC0E00DFAAA5 /* CDMarkdownKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = B26790392868AC0E00DFAAA5 /* CDMarkdownKit.swift */; }; B29FE73C21AF01B6009A4BC1 /* Dictionary+CDMarkdownKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = B29FE73B21AF01B6009A4BC1 /* Dictionary+CDMarkdownKit.swift */; }; B29FE73D21AF01B6009A4BC1 /* Dictionary+CDMarkdownKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = B29FE73B21AF01B6009A4BC1 /* Dictionary+CDMarkdownKit.swift */; }; B29FE73E21AF01B6009A4BC1 /* Dictionary+CDMarkdownKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = B29FE73B21AF01B6009A4BC1 /* Dictionary+CDMarkdownKit.swift */; }; B29FE73F21AF01B6009A4BC1 /* Dictionary+CDMarkdownKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = B29FE73B21AF01B6009A4BC1 /* Dictionary+CDMarkdownKit.swift */; }; - B2ACA09B1FBF953A00EABEF6 /* CDMarkdownKit.h in Headers */ = {isa = PBXBuildFile; fileRef = B2B366021F324CF10078B962 /* CDMarkdownKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B2ACA09C1FBF954600EABEF6 /* CDMarkdownKit.h in Headers */ = {isa = PBXBuildFile; fileRef = B2B366021F324CF10078B962 /* CDMarkdownKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B2ACA09D1FBF955400EABEF6 /* CDMarkdownKit.h in Headers */ = {isa = PBXBuildFile; fileRef = B2B366021F324CF10078B962 /* CDMarkdownKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; B2ACA09E1FBF95A400EABEF6 /* CDMarkdownParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2B366091F324DE90078B962 /* CDMarkdownParser.swift */; }; B2ACA09F1FBF95A400EABEF6 /* CDMarkdownAutomaticLink.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2B3660B1F324DE90078B962 /* CDMarkdownAutomaticLink.swift */; }; B2ACA0A01FBF95A400EABEF6 /* CDMarkdownBold.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2B3660C1F324DE90078B962 /* CDMarkdownBold.swift */; }; @@ -125,7 +126,6 @@ B2ACA0E61FBF967800EABEF6 /* CDMarkdownLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2B3660A1F324DE90078B962 /* CDMarkdownLabel.swift */; }; B2ACA0E71FBF967800EABEF6 /* CDMarkdownLayoutManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2B366161F324DE90078B962 /* CDMarkdownLayoutManager.swift */; }; B2ACA0E81FBF967800EABEF6 /* CDMarkdownTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2B366111F324DE90078B962 /* CDMarkdownTextView.swift */; }; - B2B366041F324CF10078B962 /* CDMarkdownKit.h in Headers */ = {isa = PBXBuildFile; fileRef = B2B366021F324CF10078B962 /* CDMarkdownKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; B2B366201F324DE90078B962 /* CDMarkdownImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2B366071F324DE90078B962 /* CDMarkdownImage.swift */; }; B2B366211F324DE90078B962 /* CDMarkdownLink.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2B366081F324DE90078B962 /* CDMarkdownLink.swift */; }; B2B366221F324DE90078B962 /* CDMarkdownParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2B366091F324DE90078B962 /* CDMarkdownParser.swift */; }; @@ -164,6 +164,8 @@ B22C0E9221B1AD16006CE401 /* NSAttributedString+CDMarkdownKit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSAttributedString+CDMarkdownKit.swift"; sourceTree = ""; }; B255AD8120D7FADF00E8044D /* .swiftlint.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = .swiftlint.yml; sourceTree = ""; }; B255AD8520D8000A00E8044D /* CDAttributedStringKey.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CDAttributedStringKey.swift; sourceTree = ""; }; + B26790392868AC0E00DFAAA5 /* CDMarkdownKit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CDMarkdownKit.swift; sourceTree = ""; }; + B267903E2868B2D700DFAAA5 /* ci.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; name = ci.yml; path = .github/workflows/ci.yml; sourceTree = ""; }; B27A77FF1FC13F7D001491C6 /* CDMarkdownKit.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CDMarkdownKit.podspec; sourceTree = ""; }; B27A78001FC13F7D001491C6 /* Package.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; B27A78011FC13F7D001491C6 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; @@ -174,7 +176,6 @@ B2ACA0841FBF940700EABEF6 /* CDMarkdownKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CDMarkdownKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; B2ACA0911FBF941B00EABEF6 /* CDMarkdownKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CDMarkdownKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; B2B365B71F3245800078B962 /* CDMarkdownKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CDMarkdownKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - B2B366021F324CF10078B962 /* CDMarkdownKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDMarkdownKit.h; sourceTree = ""; }; B2B366031F324CF10078B962 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; B2B366071F324DE90078B962 /* CDMarkdownImage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CDMarkdownImage.swift; sourceTree = ""; }; B2B366081F324DE90078B962 /* CDMarkdownLink.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CDMarkdownLink.swift; sourceTree = ""; }; @@ -203,7 +204,6 @@ B2B3661F1F324DE90078B962 /* CDFont+CDMarkdownKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CDFont+CDMarkdownKit.swift"; sourceTree = ""; }; B2D61BD320CF62F80091BFFF /* ISSUE_TEMPLATE.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = ISSUE_TEMPLATE.md; path = .github/ISSUE_TEMPLATE.md; sourceTree = ""; }; B2D61BD420CF62F80091BFFF /* PULL_REQUEST_TEMPLATE.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = PULL_REQUEST_TEMPLATE.md; path = .github/PULL_REQUEST_TEMPLATE.md; sourceTree = ""; }; - B2D9233B210BA12200598A16 /* .travis.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = .travis.yml; sourceTree = ""; }; B2FD53B520CFACA3004E97B5 /* CONTRIBUTING.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CONTRIBUTING.md; sourceTree = ""; }; /* End PBXFileReference section */ @@ -266,8 +266,8 @@ isa = PBXGroup; children = ( B255AD8120D7FADF00E8044D /* .swiftlint.yml */, - B2D9233B210BA12200598A16 /* .travis.yml */, B27A77FF1FC13F7D001491C6 /* CDMarkdownKit.podspec */, + B267903E2868B2D700DFAAA5 /* ci.yml */, B27A78011FC13F7D001491C6 /* LICENSE */, B27A78001FC13F7D001491C6 /* Package.swift */, ); @@ -298,6 +298,7 @@ B2B366011F324CF10078B962 /* Source */ = { isa = PBXGroup; children = ( + B26790392868AC0E00DFAAA5 /* CDMarkdownKit.swift */, B2B366091F324DE90078B962 /* CDMarkdownParser.swift */, B2B366391F324DF50078B962 /* Elements */, B2B3663B1F324E5D0078B962 /* Extensions */, @@ -312,7 +313,6 @@ B2B366061F324D2A0078B962 /* Supporting Files */ = { isa = PBXGroup; children = ( - B2B366021F324CF10078B962 /* CDMarkdownKit.h */, B2B366031F324CF10078B962 /* Info.plist */, ); name = "Supporting Files"; @@ -391,7 +391,6 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - B2ACA09B1FBF953A00EABEF6 /* CDMarkdownKit.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -399,7 +398,6 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - B2ACA09C1FBF954600EABEF6 /* CDMarkdownKit.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -407,7 +405,6 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - B2ACA09D1FBF955400EABEF6 /* CDMarkdownKit.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -415,7 +412,6 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - B2B366041F324CF10078B962 /* CDMarkdownKit.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -504,7 +500,7 @@ B2B365AE1F3245800078B962 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0940; + LastUpgradeCheck = 1340; ORGANIZATIONNAME = "Christopher de Haan"; TargetAttributes = { B2ACA0761FBF93ED00EABEF6 = { @@ -657,6 +653,7 @@ B2ACA0B01FBF95A400EABEF6 /* CDMarkdownElement.swift in Sources */, B2ACA0AA1FBF95A400EABEF6 /* CDMarkdownEscaping.swift in Sources */, B2ACA0A21FBF95A400EABEF6 /* CDMarkdownHeader.swift in Sources */, + B267903B2868AC0E00DFAAA5 /* CDMarkdownKit.swift in Sources */, B2ACA0A31FBF95A400EABEF6 /* CDMarkdownImage.swift in Sources */, B2ACA0A41FBF95A400EABEF6 /* CDMarkdownItalic.swift in Sources */, B29FE73D21AF01B6009A4BC1 /* Dictionary+CDMarkdownKit.swift in Sources */, @@ -699,6 +696,7 @@ B2ACA0C91FBF960A00EABEF6 /* CDMarkdownElement.swift in Sources */, B2ACA0C31FBF960A00EABEF6 /* CDMarkdownEscaping.swift in Sources */, B2ACA0BB1FBF960A00EABEF6 /* CDMarkdownHeader.swift in Sources */, + B267903C2868AC0E00DFAAA5 /* CDMarkdownKit.swift in Sources */, B2ACA0BC1FBF960A00EABEF6 /* CDMarkdownImage.swift in Sources */, B2ACA0BD1FBF960A00EABEF6 /* CDMarkdownItalic.swift in Sources */, B29FE73E21AF01B6009A4BC1 /* Dictionary+CDMarkdownKit.swift in Sources */, @@ -741,6 +739,7 @@ B2ACA0E21FBF967800EABEF6 /* CDMarkdownElement.swift in Sources */, B2ACA0DC1FBF967800EABEF6 /* CDMarkdownEscaping.swift in Sources */, B2ACA0D41FBF967800EABEF6 /* CDMarkdownHeader.swift in Sources */, + B267903D2868AC0E00DFAAA5 /* CDMarkdownKit.swift in Sources */, B2ACA0D51FBF967800EABEF6 /* CDMarkdownImage.swift in Sources */, B2ACA0D61FBF967800EABEF6 /* CDMarkdownItalic.swift in Sources */, B29FE73F21AF01B6009A4BC1 /* Dictionary+CDMarkdownKit.swift in Sources */, @@ -783,6 +782,7 @@ B2B3662D1F324DE90078B962 /* CDMarkdownElement.swift in Sources */, B2B3662E1F324DE90078B962 /* CDMarkdownEscaping.swift in Sources */, B2B366271F324DE90078B962 /* CDMarkdownHeader.swift in Sources */, + B267903A2868AC0E00DFAAA5 /* CDMarkdownKit.swift in Sources */, B2B366201F324DE90078B962 /* CDMarkdownImage.swift in Sources */, B2B366281F324DE90078B962 /* CDMarkdownItalic.swift in Sources */, B29FE73C21AF01B6009A4BC1 /* Dictionary+CDMarkdownKit.swift in Sources */, @@ -815,14 +815,12 @@ B2ACA07D1FBF93ED00EABEF6 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_VERSION = A; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MARKETING_VERSION = 2.1.1; SDKROOT = macosx; SKIP_INSTALL = YES; }; @@ -831,14 +829,12 @@ B2ACA07E1FBF93ED00EABEF6 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_VERSION = A; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MARKETING_VERSION = 2.1.1; SDKROOT = macosx; SKIP_INSTALL = YES; }; @@ -847,7 +843,6 @@ B2ACA08A1FBF940700EABEF6 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -861,7 +856,6 @@ B2ACA08B1FBF940700EABEF6 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -875,7 +869,6 @@ B2ACA0971FBF941B00EABEF6 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -890,7 +883,6 @@ B2ACA0981FBF941B00EABEF6 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -910,7 +902,6 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_UNDEFINED_BEHAVIOR_SANITIZER_INTEGER = YES; CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES; @@ -928,6 +919,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -957,7 +949,7 @@ INFOPLIST_FILE = Source/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 10.0; MACOSX_DEPLOYMENT_TARGET = 10.12; - MARKETING_VERSION = 2.1.1; + MARKETING_VERSION = 2.2.0; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.christopherdehaan.CDMarkdownKit; PRODUCT_NAME = CDMarkdownKit; @@ -979,7 +971,6 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_UNDEFINED_BEHAVIOR_SANITIZER_INTEGER = YES; CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES; @@ -997,6 +988,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -1020,7 +1012,7 @@ INFOPLIST_FILE = Source/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 10.0; MACOSX_DEPLOYMENT_TARGET = 10.12; - MARKETING_VERSION = 2.1.1; + MARKETING_VERSION = 2.2.0; PRODUCT_BUNDLE_IDENTIFIER = com.christopherdehaan.CDMarkdownKit; PRODUCT_NAME = CDMarkdownKit; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; @@ -1037,13 +1029,11 @@ B2B365C01F3245800078B962 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MARKETING_VERSION = 2.1.1; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -1053,13 +1043,11 @@ B2B365C11F3245800078B962 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MARKETING_VERSION = 2.1.1; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; diff --git a/CDMarkdownKit.xcodeproj/xcshareddata/xcschemes/CDMarkdownKit iOS.xcscheme b/CDMarkdownKit.xcodeproj/xcshareddata/xcschemes/CDMarkdownKit iOS.xcscheme index f34b809..751fee2 100644 --- a/CDMarkdownKit.xcodeproj/xcshareddata/xcschemes/CDMarkdownKit iOS.xcscheme +++ b/CDMarkdownKit.xcodeproj/xcshareddata/xcschemes/CDMarkdownKit iOS.xcscheme @@ -1,6 +1,6 @@ - - - - - - - - - - - - - - - - - + + - + + @@ -14,11 +16,11 @@ - + - - + diff --git a/Example/Source/AppDelegate.swift b/Example/Source/AppDelegate.swift index 3e2a244..9f8d47c 100644 --- a/Example/Source/AppDelegate.swift +++ b/Example/Source/AppDelegate.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 8/2/17. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Example/Source/BaseViewController.swift b/Example/Source/BaseViewController.swift index 6315c69..14623c7 100644 --- a/Example/Source/BaseViewController.swift +++ b/Example/Source/BaseViewController.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 6/11/18. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Example/Source/CodeLabelViewController.swift b/Example/Source/CodeLabelViewController.swift index a666d48..c16df80 100644 --- a/Example/Source/CodeLabelViewController.swift +++ b/Example/Source/CodeLabelViewController.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 6/11/18. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Example/Source/CodeTextViewController.swift b/Example/Source/CodeTextViewController.swift index ec89f9e..c4673f5 100644 --- a/Example/Source/CodeTextViewController.swift +++ b/Example/Source/CodeTextViewController.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 8/2/17. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Example/Source/StoryboardLabelViewController.swift b/Example/Source/StoryboardLabelViewController.swift index 4d1b9f5..7cd4468 100644 --- a/Example/Source/StoryboardLabelViewController.swift +++ b/Example/Source/StoryboardLabelViewController.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 6/11/18. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Example/Source/StoryboardTextViewController.swift b/Example/Source/StoryboardTextViewController.swift index 40826a2..d082eda 100644 --- a/Example/Source/StoryboardTextViewController.swift +++ b/Example/Source/StoryboardTextViewController.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 6/11/18. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Example/iOS Example.xcodeproj/project.pbxproj b/Example/iOS Example.xcodeproj/project.pbxproj index a60e79d..95a4fae 100644 --- a/Example/iOS Example.xcodeproj/project.pbxproj +++ b/Example/iOS Example.xcodeproj/project.pbxproj @@ -7,8 +7,7 @@ objects = { /* Begin PBXBuildFile section */ - 5F40591A24FC66A100DBCEF8 /* CDMarkdownKit.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = B2B366431F324FAA0078B962 /* CDMarkdownKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - B255AD9620D8182500E8044D /* CDMarkdownKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B2B366431F324FAA0078B962 /* CDMarkdownKit.framework */; }; + 5F40591A24FC66A100DBCEF8 /* CDMarkdownKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = B2B366431F324FAA0078B962 /* CDMarkdownKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; B2B365EA1F324BDA0078B962 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2B365E81F324BDA0078B962 /* AppDelegate.swift */; }; B2B365EB1F324BDA0078B962 /* CodeTextViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2B365E91F324BDA0078B962 /* CodeTextViewController.swift */; }; B2B365F81F324C0C0078B962 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B2B365F71F324C0C0078B962 /* Assets.xcassets */; }; @@ -60,15 +59,15 @@ /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ - B2B366481F324FC80078B962 /* Copy Frameworks */ = { + B2B366481F324FC80078B962 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 10; files = ( - 5F40591A24FC66A100DBCEF8 /* CDMarkdownKit.framework in Copy Frameworks */, + 5F40591A24FC66A100DBCEF8 /* CDMarkdownKit.framework in Embed Frameworks */, ); - name = "Copy Frameworks"; + name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; /* End PBXCopyFilesBuildPhase section */ @@ -94,7 +93,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - B255AD9620D8182500E8044D /* CDMarkdownKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -173,7 +171,7 @@ B2B365C71F324A930078B962 /* Sources */, B2B365C81F324A930078B962 /* Frameworks */, B2B365C91F324A930078B962 /* Resources */, - B2B366481F324FC80078B962 /* Copy Frameworks */, + B2B366481F324FC80078B962 /* Embed Frameworks */, ); buildRules = ( ); @@ -192,7 +190,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0830; - LastUpgradeCheck = 0940; + LastUpgradeCheck = 1340; ORGANIZATIONNAME = "Christopher de Haan"; TargetAttributes = { B2B365CA1F324A930078B962 = { @@ -336,6 +334,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -395,6 +394,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -416,7 +416,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 10.0; MACOSX_DEPLOYMENT_TARGET = 10.12; SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; diff --git a/Example/iOS Example.xcodeproj/xcshareddata/xcschemes/iOS Example.xcscheme b/Example/iOS Example.xcodeproj/xcshareddata/xcschemes/iOS Example.xcscheme index 1b92a54..addcb10 100644 --- a/Example/iOS Example.xcodeproj/xcshareddata/xcschemes/iOS Example.xcscheme +++ b/Example/iOS Example.xcodeproj/xcshareddata/xcschemes/iOS Example.xcscheme @@ -1,6 +1,6 @@ +Copyright © 2016-2022 Christopher de Haan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Package.swift b/Package.swift index e4adf3e..0da13c8 100644 --- a/Package.swift +++ b/Package.swift @@ -5,7 +5,7 @@ // // Created by Christopher de Haan on 05/07/2017. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -39,13 +39,15 @@ let package = Package( products: [ .library( name: "CDMarkdownKit", - targets: ["CDMarkdownKit"] - ) + targets: ["CDMarkdownKit"]) ], targets: [ .target( name: "CDMarkdownKit", - path: "Source" - ) + path: "Source", + exclude: ["Info.plist"], + linkerSettings: [ + .linkedFramework("UIKit", .when(platforms: [.iOS, .tvOS])) + ]) ], swiftLanguageVersions: [.v5]) diff --git a/Package@swift-5.3.swift b/Package@swift-5.3.swift new file mode 100644 index 0000000..d1aa39c --- /dev/null +++ b/Package@swift-5.3.swift @@ -0,0 +1,53 @@ +// swift-tools-version:5.3 +// +// Package.swift +// CDMarkdownKit +// +// Created by Christopher de Haan on 6/26/2022. +// +// Copyright © 2016-2022 Christopher de Haan +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import PackageDescription + +let package = Package( + name: "CDMarkdownKit", + platforms: [ + .macOS(.v10_12), + .iOS(.v10), + .tvOS(.v10), + .watchOS(.v3) + ], + products: [ + .library( + name: "CDMarkdownKit", + targets: ["CDMarkdownKit"]) + ], + targets: [ + .target( + name: "CDMarkdownKit", + path: "Source", + exclude: ["Info.plist"], + linkerSettings: [ + .linkedFramework("UIKit", .when(platforms: [.iOS, .tvOS])) + ]) + ], + swiftLanguageVersions: [.v5]) diff --git a/Package@swift-5.4.swift b/Package@swift-5.4.swift new file mode 100644 index 0000000..942c14e --- /dev/null +++ b/Package@swift-5.4.swift @@ -0,0 +1,53 @@ +// swift-tools-version:5.4 +// +// Package.swift +// CDMarkdownKit +// +// Created by Christopher de Haan on 6/26/2022. +// +// Copyright © 2016-2022 Christopher de Haan +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import PackageDescription + +let package = Package( + name: "CDMarkdownKit", + platforms: [ + .macOS(.v10_12), + .iOS(.v10), + .tvOS(.v10), + .watchOS(.v3) + ], + products: [ + .library( + name: "CDMarkdownKit", + targets: ["CDMarkdownKit"]) + ], + targets: [ + .target( + name: "CDMarkdownKit", + path: "Source", + exclude: ["Info.plist"], + linkerSettings: [ + .linkedFramework("UIKit", .when(platforms: [.iOS, .tvOS])) + ]) + ], + swiftLanguageVersions: [.v5]) diff --git a/Package@swift-5.5.swift b/Package@swift-5.5.swift new file mode 100644 index 0000000..ee68576 --- /dev/null +++ b/Package@swift-5.5.swift @@ -0,0 +1,54 @@ +// swift-tools-version:5.5 +// +// Package.swift +// CDMarkdownKit +// +// Created by Christopher de Haan on 6/26/2022. +// +// Copyright © 2016-2022 Christopher de Haan +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import PackageDescription + +let package = Package( + name: "CDMarkdownKit", + platforms: [ + .macOS(.v10_12), + .iOS(.v10), + .tvOS(.v10), + .watchOS(.v3) + ], + products: [ + .library( + name: "CDMarkdownKit", + targets: ["CDMarkdownKit"]) + ], + targets: [ + .target( + name: "CDMarkdownKit", + path: "Source", + exclude: ["Info.plist"], + linkerSettings: [ + .linkedFramework("UIKit", .when(platforms: [.iOS, .tvOS])) + ]) + ], + swiftLanguageVersions: [.v5]) + diff --git a/README.md b/README.md index a43937f..35ba4a7 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,42 @@

- CDMarkdownKit + CDMarkdownKit

- Star CDMarkdownKit On Github + Star CDMarkdownKit On Github - Stack Overflow + Stack Overflow

- - CI Status + + CI Status GitHub Release + + Swift Versions + + + Platforms + - Version + CocoaPods Compatible Carthage compatible - - License + + Swift Package Manager Compatible - Platform + License

@@ -43,12 +49,15 @@ For a demonstration of the capabilities of CDMarkdownKit; run the iOS Example pr - [Features](#features) - [Requirements](#requirements) - [Installation](#installation) +- [Contributing](#contributing) - [Usage](#usage) - [Initialization](#initialization) - [Customization](#customization) - [Supported Markdown Elements](#supported-markdown-elements) - [CDMarkdownTextView](#cdmarkdowntextview) - [CDMarkdownLabel](#cdmarkdownlabel) +- [Author](#author) +- [Credits](#credits) - [License](#license) --- @@ -79,8 +88,7 @@ For a demonstration of the capabilities of CDMarkdownKit; run the iOS Example pr ## Requirements - iOS 10.0+ / macOS 10.12+ / tvOS 10.0+ / watchOS 3.0+ -- Xcode 11+ -- Swift 5.1+ +- Swift 5.3+ --- @@ -91,7 +99,7 @@ For a demonstration of the capabilities of CDMarkdownKit; run the iOS Example pr [CocoaPods](https://cocoapods.org) is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate CDMarkdownKit into your Xcode project using CocoaPods, specify it in your `Podfile`: ```ruby -pod 'CDMarkdownKit', '2.1.1' +pod 'CDMarkdownKit', '2.2.0' ``` ### Carthage @@ -99,18 +107,18 @@ pod 'CDMarkdownKit', '2.1.1' [Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate CDMarkdownKit into your Xcode project using Carthage, specify it in your `Cartfile`: ```ogdl -github "chrisdhaan/CDMarkdownKit" == 2.1.1 +github "chrisdhaan/CDMarkdownKit" == 2.2.0 ``` ### Swift Package Manager -The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler. It is in early development, but CDMarkdownKit does support its use on supported platforms. +The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler. Once you have your Swift package set up, adding CDMarkdownKit as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`. ```swift dependencies: [ - .package(url: "https://github.com/chrisdhaan/CDMarkdownKit.git", .upToNextMajor(from: "5.0.0")) + .package(url: "https://github.com/chrisdhaan/CDMarkdownKit.git", .upToNextMajor(from: "2.2.0")) ] ``` @@ -152,6 +160,12 @@ git submodule add https://github.com/chrisdhaan/CDMarkdownKit.git --- +## Contributing + +Before contributing to CDYelpFusionKit, please read the instructions detailed in our [contribution guide](https://github.com/chrisdhaan/CDYelpFusionKit/blob/master/CONTRIBUTING.md). + +--- + ## Usage ### Initialization @@ -365,6 +379,8 @@ self.label.roundAllCorners = true Christopher de Haan, contact@christopherdehaan.me +--- + ## Credits CDMarkdownKit was influenced by [MarkdownKit](https://github.com/ivanbruel/MarkdownKit), a markdown parsing library developed by Ivan Bruel. @@ -380,6 +396,8 @@ CDMarkdownKit adds the following functionalities: - UILabel with the ability to round background text color corners for code, syntax, or all elements - macOS, tvOS, and watchOS support +--- + ## License CDMarkdownKit is available under the MIT license. See the LICENSE file for more info. diff --git a/Source/CDAttributedStringKey.swift b/Source/CDAttributedStringKey.swift index 1abbf9c..743c88f 100644 --- a/Source/CDAttributedStringKey.swift +++ b/Source/CDAttributedStringKey.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 6/18/18. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/CDColor+CDMarkdownKit.swift b/Source/CDColor+CDMarkdownKit.swift index 6f25021..745a080 100644 --- a/Source/CDColor+CDMarkdownKit.swift +++ b/Source/CDColor+CDMarkdownKit.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haann on 12/12/16. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/CDColor.swift b/Source/CDColor.swift index 1be905c..fc2bd86 100644 --- a/Source/CDColor.swift +++ b/Source/CDColor.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 11/18/17. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/CDFont+CDMarkdownKit.swift b/Source/CDFont+CDMarkdownKit.swift index 68de765..2dcfc78 100644 --- a/Source/CDFont+CDMarkdownKit.swift +++ b/Source/CDFont+CDMarkdownKit.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 11/7/16. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/CDFont.swift b/Source/CDFont.swift index 0f959a7..0a107fc 100644 --- a/Source/CDFont.swift +++ b/Source/CDFont.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 11/18/17. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/CDImage+CDMarkdownKit.swift b/Source/CDImage+CDMarkdownKit.swift index 404e8f8..4c02c8d 100644 --- a/Source/CDImage+CDMarkdownKit.swift +++ b/Source/CDImage+CDMarkdownKit.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 7/23/18. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/CDImage.swift b/Source/CDImage.swift index 6be8da5..91600f0 100644 --- a/Source/CDImage.swift +++ b/Source/CDImage.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 11/18/17. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/CDMarkdownAutomaticLink.swift b/Source/CDMarkdownAutomaticLink.swift index 7f86d8e..cb60198 100644 --- a/Source/CDMarkdownAutomaticLink.swift +++ b/Source/CDMarkdownAutomaticLink.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 11/7/16. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/CDMarkdownBold.swift b/Source/CDMarkdownBold.swift index 4bb2921..af59e2f 100644 --- a/Source/CDMarkdownBold.swift +++ b/Source/CDMarkdownBold.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 11/7/16. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/CDMarkdownCode.swift b/Source/CDMarkdownCode.swift index 42f5428..df4e51e 100644 --- a/Source/CDMarkdownCode.swift +++ b/Source/CDMarkdownCode.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 11/7/16. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/CDMarkdownCodeEscaping.swift b/Source/CDMarkdownCodeEscaping.swift index a70fd20..549caae 100644 --- a/Source/CDMarkdownCodeEscaping.swift +++ b/Source/CDMarkdownCodeEscaping.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 11/7/16. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/CDMarkdownCommonElement.swift b/Source/CDMarkdownCommonElement.swift index 84f24f5..089f24d 100644 --- a/Source/CDMarkdownCommonElement.swift +++ b/Source/CDMarkdownCommonElement.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 11/7/16. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/CDMarkdownElement.swift b/Source/CDMarkdownElement.swift index 21c61b3..751f7c6 100644 --- a/Source/CDMarkdownElement.swift +++ b/Source/CDMarkdownElement.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 11/7/16. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/CDMarkdownEscaping.swift b/Source/CDMarkdownEscaping.swift index 2ed9811..f14a860 100644 --- a/Source/CDMarkdownEscaping.swift +++ b/Source/CDMarkdownEscaping.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 11/7/16. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/CDMarkdownHeader.swift b/Source/CDMarkdownHeader.swift index a89f410..005a564 100644 --- a/Source/CDMarkdownHeader.swift +++ b/Source/CDMarkdownHeader.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 11/7/16. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/CDMarkdownImage.swift b/Source/CDMarkdownImage.swift index 9cff535..12c9b3c 100644 --- a/Source/CDMarkdownImage.swift +++ b/Source/CDMarkdownImage.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 12/15/16. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/CDMarkdownItalic.swift b/Source/CDMarkdownItalic.swift index 586dbd9..1a8e4bc 100644 --- a/Source/CDMarkdownItalic.swift +++ b/Source/CDMarkdownItalic.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 11/7/16. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/CDMarkdownKit.h b/Source/CDMarkdownKit.swift similarity index 71% rename from Source/CDMarkdownKit.h rename to Source/CDMarkdownKit.swift index c3a1e6e..afe20e2 100644 --- a/Source/CDMarkdownKit.h +++ b/Source/CDMarkdownKit.swift @@ -1,10 +1,10 @@ // -// CDMarkdownKit.h +// CDMarkdownKit.swift // CDMarkdownKit // -// Created by Christopher de Haan on 8/2/17. +// Created by Christopher de Haan on 6/26/22. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -25,7 +25,12 @@ // THE SOFTWARE. // -@import Foundation; +import Foundation -FOUNDATION_EXPORT double CDMarkdownKitVersionNumber; -FOUNDATION_EXPORT const unsigned char CDMarkdownKitVersionString[]; +// Enforce minimum Swift version for all platforms and build systems. +#if swift(<5.3) +#error("CDMarkdownKit doesn't support Swift versions below 5.3.") +#endif + +/// Current CDYelpFusionKit version. Necessary since SPM doesn't use dynamic libraries. Plus this will be more accurate. +let version = "2.2.0" diff --git a/Source/CDMarkdownLabel.swift b/Source/CDMarkdownLabel.swift index becbee7..59bd89f 100644 --- a/Source/CDMarkdownLabel.swift +++ b/Source/CDMarkdownLabel.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 12/14/16. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -250,7 +250,7 @@ open class CDMarkdownLabel: UILabel { delegate.didSelect(url) } })) -#if os(iOS) +#if os(iOS) && !targetEnvironment(macCatalyst) if SSReadingList.supportsURL(url) { actionController.addAction(UIAlertAction(title: "Add to Reading List", style: .default, diff --git a/Source/CDMarkdownLayoutManager.swift b/Source/CDMarkdownLayoutManager.swift index df614bf..86e90b3 100644 --- a/Source/CDMarkdownLayoutManager.swift +++ b/Source/CDMarkdownLayoutManager.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 12/8/16. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/CDMarkdownLevelElement.swift b/Source/CDMarkdownLevelElement.swift index 672c122..90b042a 100644 --- a/Source/CDMarkdownLevelElement.swift +++ b/Source/CDMarkdownLevelElement.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 11/7/16. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/CDMarkdownLink.swift b/Source/CDMarkdownLink.swift index 9a4baf5..64a8c53 100644 --- a/Source/CDMarkdownLink.swift +++ b/Source/CDMarkdownLink.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 11/7/16. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/CDMarkdownLinkElement.swift b/Source/CDMarkdownLinkElement.swift index 631d263..42950e3 100644 --- a/Source/CDMarkdownLinkElement.swift +++ b/Source/CDMarkdownLinkElement.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 11/7/16. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/CDMarkdownList.swift b/Source/CDMarkdownList.swift index ed6f677..d5be69e 100644 --- a/Source/CDMarkdownList.swift +++ b/Source/CDMarkdownList.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 11/7/16. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/CDMarkdownParser.swift b/Source/CDMarkdownParser.swift index 0d73efd..d8eca83 100644 --- a/Source/CDMarkdownParser.swift +++ b/Source/CDMarkdownParser.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 11/7/16. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/CDMarkdownQuote.swift b/Source/CDMarkdownQuote.swift index 3a6229b..3e8ae43 100644 --- a/Source/CDMarkdownQuote.swift +++ b/Source/CDMarkdownQuote.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 11/7/16. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/CDMarkdownStyle.swift b/Source/CDMarkdownStyle.swift index 9116cd2..7ac6a0e 100644 --- a/Source/CDMarkdownStyle.swift +++ b/Source/CDMarkdownStyle.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 11/7/16. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/CDMarkdownSyntax.swift b/Source/CDMarkdownSyntax.swift index e46506f..27e63b1 100644 --- a/Source/CDMarkdownSyntax.swift +++ b/Source/CDMarkdownSyntax.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 11/10/16. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/CDMarkdownTextView.swift b/Source/CDMarkdownTextView.swift index 94cb89e..163c8e0 100644 --- a/Source/CDMarkdownTextView.swift +++ b/Source/CDMarkdownTextView.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 12/8/16. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/CDMarkdownUnescaping.swift b/Source/CDMarkdownUnescaping.swift index acb7669..efb9d9b 100644 --- a/Source/CDMarkdownUnescaping.swift +++ b/Source/CDMarkdownUnescaping.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 11/7/16. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/Dictionary+CDMarkdownKit.swift b/Source/Dictionary+CDMarkdownKit.swift index 65515d9..51ff643 100644 --- a/Source/Dictionary+CDMarkdownKit.swift +++ b/Source/Dictionary+CDMarkdownKit.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 11/28/18. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/NSAttributedString+CDMarkdownKit.swift b/Source/NSAttributedString+CDMarkdownKit.swift index 6a63c8d..85be37b 100644 --- a/Source/NSAttributedString+CDMarkdownKit.swift +++ b/Source/NSAttributedString+CDMarkdownKit.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 11/30/18. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/NSMutableAttributedString+CDMarkdownKit.swift b/Source/NSMutableAttributedString+CDMarkdownKit.swift index 10d1125..c076316 100644 --- a/Source/NSMutableAttributedString+CDMarkdownKit.swift +++ b/Source/NSMutableAttributedString+CDMarkdownKit.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 11/30/18. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/NSTextCheckingResult+CDMarkdownKit.swift b/Source/NSTextCheckingResult+CDMarkdownKit.swift index 9e14982..18dac79 100644 --- a/Source/NSTextCheckingResult+CDMarkdownKit.swift +++ b/Source/NSTextCheckingResult+CDMarkdownKit.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 11/30/18. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/NSTextStorage+CDMarkdownKit.swift b/Source/NSTextStorage+CDMarkdownKit.swift index 5a6e4df..ee344cd 100644 --- a/Source/NSTextStorage+CDMarkdownKit.swift +++ b/Source/NSTextStorage+CDMarkdownKit.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 11/30/18. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Source/String+CDMarkdownKit.swift b/Source/String+CDMarkdownKit.swift index 71b371e..f1a2210 100644 --- a/Source/String+CDMarkdownKit.swift +++ b/Source/String+CDMarkdownKit.swift @@ -4,7 +4,7 @@ // // Created by Christopher de Haan on 11/7/16. // -// Copyright © 2016-2021 Christopher de Haan +// Copyright © 2016-2022 Christopher de Haan // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal