Skip to content
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

Update to base repo #4

Open
wants to merge 114 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
abebacd
Disable code in escaping and unescaping elements.
grantjbutler Feb 26, 2020
021f6a1
Package.swift added
diniska Apr 28, 2020
3b9a330
Target name error fixed
diniska Apr 28, 2020
1474a8b
Target dependencies
diniska Apr 28, 2020
369a495
Sources paths removed
diniska Apr 28, 2020
23160ec
Different targets structure
diniska Apr 28, 2020
789449e
Another attempt
diniska Apr 28, 2020
e54cad4
Another attempt
diniska Apr 28, 2020
a335109
Including all the code
diniska Apr 28, 2020
0e661e5
Creating unified build instead
diniska Apr 28, 2020
a4e3ccf
Updating CI script
diniska Apr 28, 2020
93bcbd1
xcode image updated
diniska Apr 28, 2020
d6f7e0b
simulator version updated
diniska Apr 28, 2020
57399bb
better match of simulator version with preinstalled on travis-ci
diniska Apr 28, 2020
41565ba
workspace reference fixed
diniska Apr 28, 2020
44f3eae
Scheme name fixed
diniska Apr 28, 2020
ca1bf31
Support a combination of bold and italic formatting
Jun 19, 2020
13f3642
Replace mega bullet with a normal bullet
pronebird Sep 25, 2020
4d00709
Fixes link being too greedy with brackets
AndreasVerhoeven Feb 2, 2021
6ec42d7
Try to balance the parentheses in links
AndreasVerhoeven Feb 2, 2021
dcc6662
Revert Podfile and minor fix
AndreasVerhoeven Feb 2, 2021
ffd7a63
Adds Package.swift
AndreasVerhoeven Feb 15, 2021
82ed419
Adds Package.swift
AndreasVerhoeven Feb 15, 2021
9984bcc
Removes Package.swift
AndreasVerhoeven Feb 15, 2021
55339cd
Adds bold+italic and replacing default elements
AndreasVerhoeven Feb 16, 2021
fc93586
Outdated script removed
diniska Apr 28, 2020
e7c5866
link type aliases
gaebel Feb 25, 2021
4faaa59
check if can import AppKit
gaebel Feb 25, 2021
771eeca
update .gitignore for SPM
gaebel Feb 25, 2021
8a97ffe
updated Pods
gaebel Feb 25, 2021
e13e7bc
add example iOS app scheme
gaebel Feb 25, 2021
c7afc42
correct target membership
gaebel Feb 25, 2021
39051ca
update README
gaebel Feb 25, 2021
24a47e5
bump swift-tools-version
gaebel Feb 25, 2021
221d167
use xcode 12 in ci
gaebel Feb 25, 2021
7dd9530
set deployment target
gaebel Feb 25, 2021
a86e48a
add missing import
gaebel Feb 25, 2021
34c096f
Merge pull request #81 from bmoliveira/diniska/master
benjohnde Feb 25, 2021
45628e9
Bump version
gaebel Mar 23, 2021
6b21f50
Correct description
gaebel Mar 23, 2021
f7fd6ed
Merge pull request #83 from bmoliveira/prepare-release-1.7
gaebel Mar 23, 2021
d95fcd8
Update README.md
gaebel Mar 23, 2021
828e996
Update version
gaebel Mar 23, 2021
b8298d8
Update README.md
gaebel Apr 2, 2021
2972e35
Merge pull request #74 from pronebird/patch-1
gaebel Apr 2, 2021
1eef116
Refactor folder structure
gaebel Apr 2, 2021
ab44385
Remove CocoaPods
gaebel Apr 2, 2021
2158b85
Use same name for iOS and macOS framework
gaebel Apr 2, 2021
4e8c32c
Cleaning up project
gaebel Apr 2, 2021
859e49e
Remove Gemfile
gaebel Apr 2, 2021
4d2c334
Switch from Travis to Github Actions
gaebel Apr 2, 2021
8b01c10
Run action when branch changes
gaebel Apr 2, 2021
fee6061
Add CI badge
gaebel Apr 2, 2021
70a2ff2
Fix wrong repo in CI badge
gaebel Apr 2, 2021
f6be343
Merge pull request #85 from gaebel/master
benjohnde Apr 2, 2021
6dcaddb
Use UIKit on macCatalyst
gaebel Apr 2, 2021
4b7a25b
Merge https://github.com/bmoliveira/MarkdownKit
gaebel Apr 2, 2021
dabda9f
Merge pull request #64 from grantjbutler/master
gaebel Apr 2, 2021
7fea026
Renamed folders/files
gaebel Apr 2, 2021
b28fd62
Fixed link to info.plist
gaebel Apr 2, 2021
0418bb6
Fix build for macCatalyst
ky1vstar Apr 20, 2021
9aa68f9
Merge pull request #87 from ky1vstar/master
gaebel Apr 20, 2021
5056f33
Bump version to 1.7.1
gaebel Apr 21, 2021
31e6f30
Update CI.yml
gaebel Apr 21, 2021
44c7802
Merge branch 'bold_and_italic' of https://github.com/velga/MarkdownKi…
gaebel Apr 21, 2021
312d1b8
Use project frameworks in example apps
gaebel Apr 22, 2021
3d99de3
Preserve current traits
gaebel Apr 22, 2021
95d0a53
Refactor additional traits appliance
gaebel Apr 22, 2021
83a66ab
Merge pull request #88 from bmoliveira/velga-bold_and_italic
gaebel Apr 22, 2021
f1c5b86
Correct regex, fixes #73
gaebel Apr 22, 2021
bc42349
Write tests for element combinations
gaebel Apr 22, 2021
adff3f4
Add test target
gaebel Apr 22, 2021
d788d22
Properly add attributes for different combinations
gaebel Apr 22, 2021
5a1935e
Test iOS and macOS
gaebel Apr 22, 2021
f4ac826
Delete legacy workspace
gaebel Apr 22, 2021
368dbf3
Update iOS test
gaebel Apr 22, 2021
f5aabed
Refactor steps
gaebel Apr 22, 2021
8efefcf
Revert "Adds bold+italic and replacing default elements"
gaebel Apr 22, 2021
7a102f2
Revert "Revert "Adds bold+italic and replacing default elements""
gaebel Apr 22, 2021
33f91dd
Resolve merge conflicts
gaebel Apr 22, 2021
56e1ae2
Resolve default element by generic
gaebel Apr 22, 2021
5621501
Don't return number of occurrences < 0
gaebel Apr 22, 2021
2a579e6
Allow inline parantheses and parse links without explicit schemes, fi…
gaebel Apr 22, 2021
f70e2d9
Merge pull request #89 from bmoliveira/wrong-regex
benjohnde Apr 23, 2021
c0706cc
Merge pull request #90 from bmoliveira/AndreasVerhoeven-master
benjohnde Apr 23, 2021
dc21a7c
Renamed view model
gaebel Apr 23, 2021
0d28eb6
Write more tests
gaebel Apr 23, 2021
386d7e6
Refactor update default elements
gaebel Apr 23, 2021
d3d3a2f
Match regex and paranthesis balancing method
gaebel Apr 23, 2021
9882c97
Detect links before auto. links
gaebel Apr 23, 2021
6c2e521
Merge pull request #91 from bmoliveira/refactoring
gaebel Apr 23, 2021
2f86b7e
Test links
gaebel Apr 24, 2021
7f472ca
Refactoring
gaebel Apr 24, 2021
4b98c7a
Add more link tests
gaebel Apr 24, 2021
8fabc70
Remove generic for consistency
gaebel Apr 24, 2021
955235f
Check for all schemes instead of just http
gaebel Apr 24, 2021
f98eb72
Fix wrong class name
gaebel Apr 24, 2021
9192df3
Handle mixed parantheses
gaebel Apr 24, 2021
9517ffa
Preserve attributes
gaebel Apr 25, 2021
a655868
Make links clickable
gaebel Apr 25, 2021
86c9ede
Change parsing order
gaebel Apr 25, 2021
5c42e69
Merge pull request #92 from bmoliveira/improve-links
benjohnde Apr 27, 2021
64d4487
Change protocol inheritance from class to AnyObject
chandlerhuff May 26, 2021
180445e
Merge pull request #93 from chandlerhuff/change-protocol-inheritance
gaebel May 26, 2021
4e3fce1
Fix a crash when parsing a list with spaces after the indicator longe…
guillaumealgis Jul 22, 2021
8df4ace
fix: Set correct required key CFBundleShortVersionString
ilia3546 Jul 22, 2021
f09a039
Merge branch 'master' into fix-carthage-appstore
ilia3546 Jul 22, 2021
9a32327
Merge pull request #94 from ipsosante/fix-list-indicator-range-crash
gaebel Jul 22, 2021
072e192
Merge pull request #95 from ilia3546/fix-carthage-appstore
gaebel Jul 22, 2021
761a30e
Fix mixing elements and inheriting attributes, fixes #97
Aug 20, 2021
d95f931
Preserve attributes with custom font
Aug 20, 2021
4270b02
Don't alter element font directly
Aug 21, 2021
3cb9e3a
Add Support for Dynamic Package
dbarden May 15, 2022
8a12b57
Merge pull request #105 from dbarden/dbarden/spm_dynamic_package
bmoliveira Jun 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CI

on:
push:
branches:
- master
pull_request:
types: [opened, reopened, edited, synchronize]
branches:
- master

jobs:
check:
runs-on: macOS-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Lint
run: pod lib lint
- name: Build & test macOS
run: |
swift build
swift test
- name: Build & test iOS
run: |
swift package generate-xcodeproj --output temp && cd temp
xcodebuild build -sdk iphoneos -scheme 'MarkdownKit-Package'
xcodebuild test -destination 'name=iPhone 12' -scheme 'MarkdownKit-Package'
cd .. && rm -r temp
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ playground.xcworkspace
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
.build/
.swiftpm/
Package.resolved

# CocoaPods
#
Expand Down
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

8 changes: 0 additions & 8 deletions Example-iOS/Resources/Localizable.strings

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Foundation
import MarkdownKit
import Alamofire

class MarkdownKitViewModel {
class ViewModel {

let markdownParser: MarkdownParser

Expand All @@ -25,7 +25,7 @@ class MarkdownKitViewModel {
}
}

extension MarkdownKitViewModel {
extension ViewModel {
func parseString(markdownString: String) {
markdownAttributedStringChanged?(markdownParser.parse(markdownString), nil)
}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class MarkdownSubreddit: MarkdownLink {
let subredditName = attributedString.attributedSubstring(from: match.range(at: 3)).string
let linkURLString = "http://reddit.com/r/\(subredditName)"
formatText(attributedString, range: match.range, link: linkURLString)
addAttributes(attributedString, range: match.range, link: linkURLString)
addAttributes(attributedString, range: match.range)
}

}
File renamed without changes.
8 changes: 8 additions & 0 deletions Examples/iOS/Resources/Localizable.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
Localizable.strings
MarkdownKit

Created by Ivan Bruel on 19/07/16.
Copyright © 2016 CocoaPods. All rights reserved.
*/
"Markdown" = "** Not bold ** vs **Bold** \n\n _ not italic _ vs _italic_ \n\n **_Italic and bold_** \n\n ~~ not strike ~~ vs ~~strike~~ \n\n * list \n\n * list \n\n + list + \n\n + list 2 + \n\n 1) list \n\n 2) list \n\n + hey \n\n 3) ahah \n\n 1) q2wwe \n\n 2) hey \n\n ([linkme](schema://domain/whees))$321 and more\n\n[linkme](schema://domain/whee()) and more.\n\n[Here](http://example.com/test(1).html)asd asd\n\n[Simple](http://example.com/test.html) aaaa\n\nCode\n\n`this is code` ```this is code too```\n\n Testing (**Bold**) or ( **Bold**)\n\n# Community Rules\n\n## Rule 1: Reddit's site-wide rules\n\n\n**[Click Here](http://www.reddit.com/rules) for reddit's 6 rules.** \n\nThey are all pretty straight forward and easy to understand, but if you would like more information about them [**Click Here**](http://www.reddit.com/wiki/faq) for reddit's Frequently Asked Questions page.\n\n**Be sure to also read [the rediquette](https://www.reddit.com/wiki/reddiquette) which is an informal guide to reddit etiquette.**\n\n_____\n\n##Rule 2: Don't be a jerk\n\n\n**We're here to have a laugh; hate speech, bigotry, and personal attacks are not allowed.**\n\n**Death threats and telling others to kill themselves will result in a ban.**\n\nThis is pretty self explanatory.\n\n_____\n\n\n##Rule 3: Follow the correct format\n\n\n**Two line joke over a re-usable character.** \n\nWe understand that some established memes do not follow this format, such as \n\n* [What Year Is It?](http://knowyourmeme.com/memes/what-year-is-it)\n\n* [I Should Buy a Boat Cat](http://knowyourmeme.com/memes/i-should-buy-a-boat-cat)\n\n* Etc\n\nHowever, these memes are already well established and thus have been grandfathered in.\n\n**Not all image macros are memes**\n\n&gt;Meme -\n\n&gt;/m\u0113m/\n\n&gt;noun\n\n&gt;an element of a culture or system of behavior that may be considered to be passed from one individual to another by nongenetic means, esp. imitation.\n\n&gt;[source](http://www.oxforddictionaries.com/us/definition/american_english/meme)\n\nBasically if the image is only relevant to one's own submission and can't be re-used (or has limited re-usability) then it's just an image macro and by definition not a meme.\n\n* [This is an example of a generic image macro.](https://i.imgur.com/LT1Fi3N.jpg)\n\nand\n\n* [This is an example of a meme.](https://i.imgur.com/871gSb7.jpg)\n\nMemes are allowed on the subreddit here, while generic image macros are better suited for /r/funny. \n\n_____\n\n##Rule 4: Don't repost\n\n**Don't post stuff you found from elsewhere on the web, it's probably been here already.**\n\nThis subreddit is for original content only, meaning memes YOU made. \n\nDo not resubmit your post because it did poorly. \n\nReposting is a bannable offense.\n\nIf you see a repost please report it as such, and [send a quick note to the mods](http://www.reddit.com/message/compose?to=%2Fr%2FAdviceAnimals&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;subject=I+found+a+repost&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;message=Here+is+a+link+to+the+comment+section+of+the+repost:%0D%0A%0DAnd+here+is+proof+that+it+is+a+repost:) if you can.\n\n____\n\n##Rule 5: No Cake Day Posts\n\n**Cake Day posts are not allowed.**\n\nPosts that mention Cake Day in the title, or in the post itself will be removed.\n\n____\n\n\n##Rule 6: Verticals, Puffins and Batman Slaps\n\n**Please do not post Verticals, Opinion Puffins or Batman Slaps.**\n\nVerticals are multiple panel memes or image macros and both are better suited for either /r/funny or /r/vertical.\n\n* [This is an example of a vertical meme.](http://i.imgflip.com/bhnki.jpg)\n\n* [This is an example of a vertical image macro](https://i.imgur.com/UrHut.jpg)\n\nThis also means posts such as [9/11 Lois](http://i.imgur.com/DxdSLIo.jpg) aren't allowed; and memes such as [Nobody cares Nedry](http://i.imgur.com/P4KwK1i.jpg) and [Confused Gandalf](http://i.imgur.com/TKujvA3.jpg) are limited to their 1 panel standard, instead of their alternate vertical counterparts.\n\n2 AdviceAnimals in a vertical are OK.\n\nMeaning combining 2 established memes together such as [Socially Awkward Penguin](http://knowyourmeme.com/memes/socially-awkward-penguin) and [Socially Awesome Penguin](http://knowyourmeme.com/memes/socially-awesome-penguin) is fine.\n\n[Here is an example of its acceptable use](https://i.imgur.com/SRYGJdo.jpg)\n\n\n\n\n* [This is unpopular opinion puffin](http://i.imgur.com/qs4z4Rm.jpg)\n\n* [This is an example of a Batman Slap](https://i.imgur.com/5rrb52F.jpg)\n\n_____\n\n\n##Rule 7: Link directly to your image\n\n**Make sure you link directly to your image.**\n\nIn other words, not just to the website, or the gallery page.\n\nHere are a few examples.\n\n* OK.\n\nhttp://i.imgur.com/wdLOqmx.png\n\n\n* Not OK.\n\nhttp://imgur.com/gallery/wdLOqmx\n\nhttp://imgur.com/memegen\n\nhttp://makeameme.org/newest\n\n\n_____\n\n\n##Rule 8: People you know\n\n**Don't make memes with pics of people that you saw in real life. Ever.**\n\nDon't try to make yourself or someone you know into a meme.\n\nAlso, we do not allow witch hunts on the subreddit.\n\n_____\n\n##Rule 9: Use an approved host\n\n**Shortened links, Facebook, Tumblr, Blogspot, etc, will be automatically removed.**\n\nPlease use one of the approved websites listed on the sidebar to make your post.\n\n_____\n\n##Rule 10: Mods have the final say\n\n**We reserve the right to remove posts, remove comments, and ban users at our own discretion.**\n\nDue to the nature of the subreddit, interpretations of what is a meme and what is an image macro sometimes have different opinions and thus decisions have to be made.\n\n_____\n\n\n#[Always feel free to message the moderators if you have ANY questions!](https://www.reddit.com/message/compose?to=%2Fr%2FAdviceAnimals)\n\n Moar code `this is code` ```(this is code too)```";
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ class ViewController: UIViewController {
return NSLocalizedString("Markdown", comment: "").stringByDecodingHTMLEntities
}()

fileprivate lazy var viewModel: MarkdownKitViewModel = {
fileprivate lazy var viewModel: ViewModel = {
// Example with custom font
// fileprivate let markdownParser = MarkdownParser(font: UIFont(name: "Product Sans", size: UIFont.systemFontSize)!)
let parser = MarkdownParser()
parser.addCustomElement(MarkdownSubreddit())

let viewModel = MarkdownKitViewModel(markdownParser: parser)
let viewModel = ViewModel(markdownParser: parser)
viewModel.markdownAttributedStringChanged = { [weak self](attributtedString, error) in
if let error = error {
NSLog("Error requesting -> \(error)")
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="17701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14460.31"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17701"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand Down Expand Up @@ -620,7 +620,7 @@
<menuItem title="Show Sidebar" keyEquivalent="s" id="kIP-vf-haE">
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
<connections>
<action selector="toggleSourceList:" target="Ady-hI-5gd" id="iwa-gc-5KM"/>
<action selector="toggleSidebar:" target="Ady-hI-5gd" id="iwa-gc-5KM"/>
</connections>
</menuItem>
<menuItem title="Enter Full Screen" keyEquivalent="f" id="4J7-dP-txa">
Expand Down Expand Up @@ -675,7 +675,7 @@
<outlet property="delegate" destination="Voe-Tx-rLC" id="PrD-fu-P6m"/>
</connections>
</application>
<customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="Example_AppKit" customModuleProvider="target"/>
<customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="Example_macOS" customModuleProvider="target"/>
<customObject id="YLy-65-1bz" customClass="NSFontManager"/>
<customObject id="Ady-hI-5gd" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
</objects>
Expand Down Expand Up @@ -705,7 +705,7 @@
<!--View Controller-->
<scene sceneID="hIz-AP-VOD">
<objects>
<viewController id="XfG-lQ-9wD" customClass="ViewController" customModule="Example_AppKit" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="XfG-lQ-9wD" customClass="ViewController" customModule="Example_macOS" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" wantsLayer="YES" id="m2S-Jp-Qdl">
<rect key="frame" x="0.0" y="0.0" width="600" height="480"/>
<autoresizingMask key="autoresizingMask"/>
Expand All @@ -716,7 +716,7 @@
<rect key="frame" x="0.0" y="0.0" width="600" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textView editable="NO" selectable="NO" importsGraphics="NO" verticallyResizable="YES" findStyle="bar" spellingCorrection="YES" smartInsertDelete="YES" id="SGu-Re-lLv">
<textView editable="NO" importsGraphics="NO" verticallyResizable="YES" findStyle="bar" spellingCorrection="YES" smartInsertDelete="YES" id="SGu-Re-lLv">
<rect key="frame" x="0.0" y="0.0" width="600" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
Expand All @@ -727,6 +727,10 @@
</textView>
</subviews>
</clipView>
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="jM4-oA-HAt">
<rect key="frame" x="-100" y="-100" width="600" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="GEY-tc-eTy">
<rect key="frame" x="584" y="0.0" width="16" height="480"/>
<autoresizingMask key="autoresizingMask"/>
Expand Down
File renamed without changes.
Loading