Skip to content

Commit 216cb18

Browse files
committed
adding support for OSX 10.7
1 parent 14c9281 commit 216cb18

File tree

51 files changed

+1873
-27
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1873
-27
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#Change Log
2+
All notable changes to this project will be documented in this file.
3+
`TSMarkdownParser` adheres to [Semantic Versioning](http://semver.org/).
4+
5+
---
6+
7+
## [2.0.2](https://github.com/laptobbe/TSMarkdownParser/releases/tag/2.0.2) (2016/03/29)
8+
Released on 2016/03/29. All issues associated with this milestone can be found using this [filter](https://github.com/laptobbe/TSMarkdownParser/issues?q=milestone%3A2.0.2+is%3Aclosed).
9+
10+
#### Added
11+
* Added support to OS X 10.7
12+
* Added a changelog [#41](https://github.com/laptobbe/TSMarkdownParser/issues/41)

TSMarkdownParser.podspec

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Pod::Spec.new do |s|
22
s.name = "TSMarkdownParser"
3-
s.version = "2.0.0"
4-
s.summary = "A markdown to NSAttributedString parser for iOS"
3+
s.version = "2.0.2"
4+
s.summary = "A markdown to NSAttributedString parser for iOS and OSX"
55

66
s.description = <<-DESC
7-
TSMarkdownParser is a markdown to NSAttributedString parser for iOS implemented using NSRegularExpressions.
7+
TSMarkdownParser is a markdown to NSAttributedString parser for iOS, TVOS and OSX implemented using NSRegularExpressions.
88
It supports many of the standard tags layed out by John Gruber on his site [Daring Fireball](http://daringfireball.net/projects/markdown/syntax).
99
It is also very extendable via Regular Expressions making it easy to add your own custom tags or a totally different parsing syntax if you like.
1010
DESC
@@ -15,8 +15,10 @@ Pod::Spec.new do |s|
1515
s.social_media_url = "http://twitter.com/laptobbe"
1616
s.ios.deployment_target = "6.0"
1717
s.tvos.deployment_target = "9.0"
18+
s.osx.deployment_target = "10.7"
1819
s.source = { :git => "https://github.com/laptobbe/TSMarkdownParser.git", :tag => s.version.to_s }
1920
s.source_files = "TSMarkdownParser/**/*.{h,m}"
2021
s.requires_arc = true
21-
s.framework = 'UIKit'
22+
s.ios.framework = 'UIKit'
23+
s.tvos.framework = 'UIKit'
2224
end

TSMarkdownParser.xcodeproj/project.pbxproj

Lines changed: 308 additions & 12 deletions
Large diffs are not rendered by default.
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "0730"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "3700F5971CAA63F90034AE2D"
18+
BuildableName = "TSMarkdownParserExample OSX.app"
19+
BlueprintName = "TSMarkdownParserExample OSX"
20+
ReferencedContainer = "container:TSMarkdownParser.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
<MacroExpansion>
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "3700F5971CAA63F90034AE2D"
36+
BuildableName = "TSMarkdownParserExample OSX.app"
37+
BlueprintName = "TSMarkdownParserExample OSX"
38+
ReferencedContainer = "container:TSMarkdownParser.xcodeproj">
39+
</BuildableReference>
40+
</MacroExpansion>
41+
<AdditionalOptions>
42+
</AdditionalOptions>
43+
</TestAction>
44+
<LaunchAction
45+
buildConfiguration = "Debug"
46+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
47+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
48+
launchStyle = "0"
49+
useCustomWorkingDirectory = "NO"
50+
ignoresPersistentStateOnLaunch = "NO"
51+
debugDocumentVersioning = "YES"
52+
debugServiceExtension = "internal"
53+
allowLocationSimulation = "YES">
54+
<BuildableProductRunnable
55+
runnableDebuggingMode = "0">
56+
<BuildableReference
57+
BuildableIdentifier = "primary"
58+
BlueprintIdentifier = "3700F5971CAA63F90034AE2D"
59+
BuildableName = "TSMarkdownParserExample OSX.app"
60+
BlueprintName = "TSMarkdownParserExample OSX"
61+
ReferencedContainer = "container:TSMarkdownParser.xcodeproj">
62+
</BuildableReference>
63+
</BuildableProductRunnable>
64+
<AdditionalOptions>
65+
</AdditionalOptions>
66+
</LaunchAction>
67+
<ProfileAction
68+
buildConfiguration = "Release"
69+
shouldUseLaunchSchemeArgsEnv = "YES"
70+
savedToolIdentifier = ""
71+
useCustomWorkingDirectory = "NO"
72+
debugDocumentVersioning = "YES">
73+
<BuildableProductRunnable
74+
runnableDebuggingMode = "0">
75+
<BuildableReference
76+
BuildableIdentifier = "primary"
77+
BlueprintIdentifier = "3700F5971CAA63F90034AE2D"
78+
BuildableName = "TSMarkdownParserExample OSX.app"
79+
BlueprintName = "TSMarkdownParserExample OSX"
80+
ReferencedContainer = "container:TSMarkdownParser.xcodeproj">
81+
</BuildableReference>
82+
</BuildableProductRunnable>
83+
</ProfileAction>
84+
<AnalyzeAction
85+
buildConfiguration = "Debug">
86+
</AnalyzeAction>
87+
<ArchiveAction
88+
buildConfiguration = "Release"
89+
revealArchiveInOrganizer = "YES">
90+
</ArchiveAction>
91+
</Scheme>

TSMarkdownParser.xcodeproj/xcshareddata/xcschemes/TSMarkdownParser.xcscheme renamed to TSMarkdownParser.xcodeproj/xcshareddata/xcschemes/TSMarkdownParserExample iOS.xcscheme

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@
1111
buildForRunning = "YES"
1212
buildForProfiling = "YES"
1313
buildForArchiving = "YES"
14-
buildForAnalyzing = "YES"
15-
hideIssues = "NO">
14+
buildForAnalyzing = "YES">
1615
<BuildableReference
1716
BuildableIdentifier = "primary"
1817
BlueprintIdentifier = "C81B78D91C54B4B800A1DE36"
1918
BuildableName = "TSMarkdownParser.app"
20-
BlueprintName = "TSMarkdownParserExample"
19+
BlueprintName = "TSMarkdownParserExample iOS"
2120
ReferencedContainer = "container:TSMarkdownParser.xcodeproj">
2221
</BuildableReference>
2322
</BuildActionEntry>
@@ -35,7 +34,7 @@
3534
BuildableIdentifier = "primary"
3635
BlueprintIdentifier = "C81B78D91C54B4B800A1DE36"
3736
BuildableName = "TSMarkdownParser.app"
38-
BlueprintName = "TSMarkdownParserExample"
37+
BlueprintName = "TSMarkdownParserExample iOS"
3938
ReferencedContainer = "container:TSMarkdownParser.xcodeproj">
4039
</BuildableReference>
4140
</MacroExpansion>
@@ -58,7 +57,7 @@
5857
BuildableIdentifier = "primary"
5958
BlueprintIdentifier = "C81B78D91C54B4B800A1DE36"
6059
BuildableName = "TSMarkdownParser.app"
61-
BlueprintName = "TSMarkdownParserExample"
60+
BlueprintName = "TSMarkdownParserExample iOS"
6261
ReferencedContainer = "container:TSMarkdownParser.xcodeproj">
6362
</BuildableReference>
6463
</BuildableProductRunnable>
@@ -77,7 +76,7 @@
7776
BuildableIdentifier = "primary"
7877
BlueprintIdentifier = "C81B78D91C54B4B800A1DE36"
7978
BuildableName = "TSMarkdownParser.app"
80-
BlueprintName = "TSMarkdownParserExample"
79+
BlueprintName = "TSMarkdownParserExample iOS"
8180
ReferencedContainer = "container:TSMarkdownParser.xcodeproj">
8281
</BuildableReference>
8382
</BuildableProductRunnable>
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "0730"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "3700F57F1CAA637C0034AE2D"
18+
BuildableName = "TSMarkdownParserExample tvOS.app"
19+
BlueprintName = "TSMarkdownParserExample tvOS"
20+
ReferencedContainer = "container:TSMarkdownParser.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
<MacroExpansion>
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "3700F57F1CAA637C0034AE2D"
36+
BuildableName = "TSMarkdownParserExample tvOS.app"
37+
BlueprintName = "TSMarkdownParserExample tvOS"
38+
ReferencedContainer = "container:TSMarkdownParser.xcodeproj">
39+
</BuildableReference>
40+
</MacroExpansion>
41+
<AdditionalOptions>
42+
</AdditionalOptions>
43+
</TestAction>
44+
<LaunchAction
45+
buildConfiguration = "Debug"
46+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
47+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
48+
launchStyle = "0"
49+
useCustomWorkingDirectory = "NO"
50+
ignoresPersistentStateOnLaunch = "NO"
51+
debugDocumentVersioning = "YES"
52+
debugServiceExtension = "internal"
53+
allowLocationSimulation = "YES">
54+
<BuildableProductRunnable
55+
runnableDebuggingMode = "0">
56+
<BuildableReference
57+
BuildableIdentifier = "primary"
58+
BlueprintIdentifier = "3700F57F1CAA637C0034AE2D"
59+
BuildableName = "TSMarkdownParserExample tvOS.app"
60+
BlueprintName = "TSMarkdownParserExample tvOS"
61+
ReferencedContainer = "container:TSMarkdownParser.xcodeproj">
62+
</BuildableReference>
63+
</BuildableProductRunnable>
64+
<AdditionalOptions>
65+
</AdditionalOptions>
66+
</LaunchAction>
67+
<ProfileAction
68+
buildConfiguration = "Release"
69+
shouldUseLaunchSchemeArgsEnv = "YES"
70+
savedToolIdentifier = ""
71+
useCustomWorkingDirectory = "NO"
72+
debugDocumentVersioning = "YES">
73+
<BuildableProductRunnable
74+
runnableDebuggingMode = "0">
75+
<BuildableReference
76+
BuildableIdentifier = "primary"
77+
BlueprintIdentifier = "3700F57F1CAA637C0034AE2D"
78+
BuildableName = "TSMarkdownParserExample tvOS.app"
79+
BlueprintName = "TSMarkdownParserExample tvOS"
80+
ReferencedContainer = "container:TSMarkdownParser.xcodeproj">
81+
</BuildableReference>
82+
</BuildableProductRunnable>
83+
</ProfileAction>
84+
<AnalyzeAction
85+
buildConfiguration = "Debug">
86+
</AnalyzeAction>
87+
<ArchiveAction
88+
buildConfiguration = "Release"
89+
revealArchiveInOrganizer = "YES">
90+
</ArchiveAction>
91+
</Scheme>

TSMarkdownParser/TSBaseParser.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@
77
//
88

99
#import "TSBaseParser.h"
10+
#import <Foundation/Foundation.h>
11+
#if TARGET_OS_IPHONE
1012
#import <UIKit/UIKit.h>
13+
#else
14+
#import <AppKit/AppKit.h>
15+
#endif
1116

1217

1318
@interface TSExpressionBlockPair : NSObject

TSMarkdownParser/TSMarkdownParser.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@
66
// Copyright (c) 2014 Computertalk Sweden. All rights reserved.
77
//
88

9+
#import <Foundation/Foundation.h>
10+
#if TARGET_OS_IPHONE
911
#import <UIKit/UIKit.h>
12+
#else
13+
#import <AppKit/AppKit.h>
14+
#endif
1015
#import "TSBaseParser.h"
1116

1217
NS_ASSUME_NONNULL_BEGIN

TSMarkdownParser/TSMarkdownParser.m

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
//
88

99
#import "TSMarkdownParser.h"
10-
10+
#if !TARGET_OS_IPHONE
11+
typedef NSColor UIColor;
12+
typedef NSImage UIImage;
13+
typedef NSFont UIFont;
14+
#endif
1115

1216
@implementation TSMarkdownParser
1317

@@ -34,7 +38,12 @@ - (instancetype)init {
3438
_monospaceAttributes = @{ NSFontAttributeName: [UIFont fontWithName:@"Menlo" size:12],
3539
NSForegroundColorAttributeName: [UIColor colorWithRed:0.95 green:0.54 blue:0.55 alpha:1] };
3640
_strongAttributes = @{ NSFontAttributeName: [UIFont boldSystemFontOfSize:12] };
41+
42+
#if TARGET_OS_IPHONE
3743
_emphasisAttributes = @{ NSFontAttributeName: [UIFont italicSystemFontOfSize:12] };
44+
#else
45+
_emphasisAttributes = @{ NSFontAttributeName: [[NSFontManager sharedFontManager] convertFont:[UIFont systemFontOfSize:12] toHaveTrait:NSItalicFontMask] };
46+
#endif
3847

3948
return self;
4049
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//
2+
// AppDelegate.h
3+
// TSMarkdownParserExample OSX
4+
//
5+
// Created by Antoine Cœur on 3/29/16.
6+
// Copyright © 2016 Computertalk Sweden. All rights reserved.
7+
//
8+
9+
#import <Cocoa/Cocoa.h>
10+
11+
@interface AppDelegate : NSObject <NSApplicationDelegate>
12+
13+
14+
@end
15+

0 commit comments

Comments
 (0)