├── .gitignore ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── Podfile ├── Podfile.lock ├── Pods ├── Headers │ ├── Private │ │ └── ZWEmoji │ │ │ └── ZWEmoji.h │ └── Public │ │ └── ZWEmoji │ │ └── ZWEmoji.h ├── Local Podspecs │ └── ZWEmoji.podspec.json ├── Manifest.lock ├── Pods.xcodeproj │ └── project.pbxproj ├── Target Support Files │ ├── Pods-QLMarkdownGFM │ │ ├── Pods-QLMarkdownGFM-acknowledgements.markdown │ │ ├── Pods-QLMarkdownGFM-acknowledgements.plist │ │ ├── Pods-QLMarkdownGFM-dummy.m │ │ ├── Pods-QLMarkdownGFM-frameworks.sh │ │ ├── Pods-QLMarkdownGFM-resources.sh │ │ ├── Pods-QLMarkdownGFM.debug.xcconfig │ │ └── Pods-QLMarkdownGFM.release.xcconfig │ └── ZWEmoji │ │ ├── ZWEmoji-dummy.m │ │ ├── ZWEmoji-prefix.pch │ │ ├── ZWEmoji.debug.xcconfig │ │ ├── ZWEmoji.release.xcconfig │ │ └── ZWEmoji.xcconfig └── ZWEmoji │ ├── LICENSE.txt │ ├── README.md │ └── lib │ ├── ZWEmoji.h │ └── ZWEmoji.m ├── QLMarkdownGFM.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── QLMarkdownGFM.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── QLMarkdownGFM ├── GeneratePreviewForURL.m ├── GenerateThumbnailForURL.m ├── Info.plist ├── main.c ├── markdown.h ├── markdown.m └── styles.css ├── README.md ├── cmark ├── include │ ├── cmark-gfm-core-extensions.h │ ├── cmark-gfm-extension_api.h │ ├── cmark-gfm.h │ ├── cmark-gfm_export.h │ ├── cmark-gfm_version.h │ └── config.h └── lib │ ├── libcmark-gfm-extensions.a │ └── libcmark-gfm.a ├── entitlements.plist ├── images ├── preview.png └── thumbnail.png ├── install-cmark.sh └── release.sh /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | cmark/bin 3 | cmark/share 4 | cmark/lib/* 5 | 6 | !cmark/lib/*.a 7 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'cocoapods' -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | CFPropertyList (3.0.7) 5 | base64 6 | nkf 7 | rexml 8 | activesupport (7.1.3.2) 9 | base64 10 | bigdecimal 11 | concurrent-ruby (~> 1.0, >= 1.0.2) 12 | connection_pool (>= 2.2.5) 13 | drb 14 | i18n (>= 1.6, < 2) 15 | minitest (>= 5.1) 16 | mutex_m 17 | tzinfo (~> 2.0) 18 | addressable (2.8.6) 19 | public_suffix (>= 2.0.2, < 6.0) 20 | algoliasearch (1.27.5) 21 | httpclient (~> 2.8, >= 2.8.3) 22 | json (>= 1.5.1) 23 | atomos (0.1.3) 24 | base64 (0.2.0) 25 | bigdecimal (3.1.7) 26 | claide (1.1.0) 27 | cocoapods (1.15.2) 28 | addressable (~> 2.8) 29 | claide (>= 1.0.2, < 2.0) 30 | cocoapods-core (= 1.15.2) 31 | cocoapods-deintegrate (>= 1.0.3, < 2.0) 32 | cocoapods-downloader (>= 2.1, < 3.0) 33 | cocoapods-plugins (>= 1.0.0, < 2.0) 34 | cocoapods-search (>= 1.0.0, < 2.0) 35 | cocoapods-trunk (>= 1.6.0, < 2.0) 36 | cocoapods-try (>= 1.1.0, < 2.0) 37 | colored2 (~> 3.1) 38 | escape (~> 0.0.4) 39 | fourflusher (>= 2.3.0, < 3.0) 40 | gh_inspector (~> 1.0) 41 | molinillo (~> 0.8.0) 42 | nap (~> 1.0) 43 | ruby-macho (>= 2.3.0, < 3.0) 44 | xcodeproj (>= 1.23.0, < 2.0) 45 | cocoapods-core (1.15.2) 46 | activesupport (>= 5.0, < 8) 47 | addressable (~> 2.8) 48 | algoliasearch (~> 1.0) 49 | concurrent-ruby (~> 1.1) 50 | fuzzy_match (~> 2.0.4) 51 | nap (~> 1.0) 52 | netrc (~> 0.11) 53 | public_suffix (~> 4.0) 54 | typhoeus (~> 1.0) 55 | cocoapods-deintegrate (1.0.5) 56 | cocoapods-downloader (2.1) 57 | cocoapods-plugins (1.0.0) 58 | nap 59 | cocoapods-search (1.0.1) 60 | cocoapods-trunk (1.6.0) 61 | nap (>= 0.8, < 2.0) 62 | netrc (~> 0.11) 63 | cocoapods-try (1.2.0) 64 | colored2 (3.1.2) 65 | concurrent-ruby (1.2.3) 66 | connection_pool (2.4.1) 67 | drb (2.2.1) 68 | escape (0.0.4) 69 | ethon (0.16.0) 70 | ffi (>= 1.15.0) 71 | ffi (1.16.3) 72 | fourflusher (2.3.1) 73 | fuzzy_match (2.0.4) 74 | gh_inspector (1.1.3) 75 | httpclient (2.8.3) 76 | i18n (1.14.4) 77 | concurrent-ruby (~> 1.0) 78 | json (2.7.1) 79 | minitest (5.22.3) 80 | molinillo (0.8.0) 81 | mutex_m (0.2.0) 82 | nanaimo (0.3.0) 83 | nap (1.1.0) 84 | netrc (0.11.0) 85 | nkf (0.2.0) 86 | public_suffix (4.0.7) 87 | rexml (3.3.9) 88 | ruby-macho (2.5.1) 89 | typhoeus (1.4.1) 90 | ethon (>= 0.9.0) 91 | tzinfo (2.0.6) 92 | concurrent-ruby (~> 1.0) 93 | xcodeproj (1.25.0) 94 | CFPropertyList (>= 2.3.3, < 4.0) 95 | atomos (~> 0.1.3) 96 | claide (>= 1.0.2, < 2.0) 97 | colored2 (~> 3.1) 98 | nanaimo (~> 0.3.0) 99 | rexml (>= 3.3.2, < 4.0) 100 | 101 | PLATFORMS 102 | ruby 103 | 104 | DEPENDENCIES 105 | cocoapods 106 | 107 | BUNDLED WITH 108 | 2.5.6 109 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2018, Watson 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | * Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | platform :osx, '10.11' 2 | 3 | target 'QLMarkdownGFM' do 4 | pod 'ZWEmoji', git: "https://github.com/Watson1978/ZWEmoji.git" 5 | end 6 | 7 | # Workaround 8 | # CocoaPods configures deployment target to '10.6' for ZWEmoji 9 | post_install do |installer| 10 | installer.pods_project.targets.each do |target| 11 | target.build_configurations.each do |config| 12 | config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '10.11' 13 | end 14 | end 15 | end -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - ZWEmoji (0.4.0) 3 | 4 | DEPENDENCIES: 5 | - ZWEmoji (from `https://github.com/Watson1978/ZWEmoji.git`) 6 | 7 | EXTERNAL SOURCES: 8 | ZWEmoji: 9 | :git: https://github.com/Watson1978/ZWEmoji.git 10 | 11 | CHECKOUT OPTIONS: 12 | ZWEmoji: 13 | :commit: c26d13a665f7cb36a465528ea149502ce44fb7f5 14 | :git: https://github.com/Watson1978/ZWEmoji.git 15 | 16 | SPEC CHECKSUMS: 17 | ZWEmoji: 1b01cbf170c55a812c4ade15bc6399744dfdf523 18 | 19 | PODFILE CHECKSUM: 119c9ba2290aac403b64b066592b51f584f8bc29 20 | 21 | COCOAPODS: 1.15.2 22 | -------------------------------------------------------------------------------- /Pods/Headers/Private/ZWEmoji/ZWEmoji.h: -------------------------------------------------------------------------------- 1 | ../../../ZWEmoji/lib/ZWEmoji.h -------------------------------------------------------------------------------- /Pods/Headers/Public/ZWEmoji/ZWEmoji.h: -------------------------------------------------------------------------------- 1 | ../../../ZWEmoji/lib/ZWEmoji.h -------------------------------------------------------------------------------- /Pods/Local Podspecs/ZWEmoji.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ZWEmoji", 3 | "version": "0.4.0", 4 | "license": "MIT", 5 | "summary": "Objective-C library for using unicode emoji based on emoji codes used in Campfire/GitHub", 6 | "homepage": "https://github.com/zachwaugh/ZWEmoji", 7 | "authors": { 8 | "Zach Waugh": "zwaugh@gmail.com" 9 | }, 10 | "source": { 11 | "git": "https://github.com/zachwaugh/ZWEmoji.git", 12 | "tag": "0.4.0" 13 | }, 14 | "source_files": "lib", 15 | "requires_arc": true, 16 | "platforms": { 17 | "osx": null, 18 | "ios": null, 19 | "tvos": null, 20 | "visionos": null, 21 | "watchos": null 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - ZWEmoji (0.4.0) 3 | 4 | DEPENDENCIES: 5 | - ZWEmoji (from `https://github.com/Watson1978/ZWEmoji.git`) 6 | 7 | EXTERNAL SOURCES: 8 | ZWEmoji: 9 | :git: https://github.com/Watson1978/ZWEmoji.git 10 | 11 | CHECKOUT OPTIONS: 12 | ZWEmoji: 13 | :commit: c26d13a665f7cb36a465528ea149502ce44fb7f5 14 | :git: https://github.com/Watson1978/ZWEmoji.git 15 | 16 | SPEC CHECKSUMS: 17 | ZWEmoji: 1b01cbf170c55a812c4ade15bc6399744dfdf523 18 | 19 | PODFILE CHECKSUM: 119c9ba2290aac403b64b066592b51f584f8bc29 20 | 21 | COCOAPODS: 1.15.2 22 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 50D5D3033D2BC4F9C527CC43415542D3 /* ZWEmoji.h in Headers */ = {isa = PBXBuildFile; fileRef = CE1D14C39B4D423CEAC71EF2B391F13E /* ZWEmoji.h */; settings = {ATTRIBUTES = (Project, ); }; }; 11 | D4262BCEBBDAEA17A1159FF7CBF99799 /* ZWEmoji-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = EDD5C95368D18F235D50A775B6F5C722 /* ZWEmoji-dummy.m */; }; 12 | E668F8BCD3CE3D1D567B6EDA0FA8EC22 /* Pods-QLMarkdownGFM-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E99F4436597D22772A83796C27679795 /* Pods-QLMarkdownGFM-dummy.m */; }; 13 | FA404E79F4790BC931D42B5DBE908051 /* ZWEmoji.m in Sources */ = {isa = PBXBuildFile; fileRef = 822441EF7DD7778B0DCD1B9FB90958F1 /* ZWEmoji.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; 14 | /* End PBXBuildFile section */ 15 | 16 | /* Begin PBXContainerItemProxy section */ 17 | 37D9F972A041679AD4B3AE9DD9135855 /* PBXContainerItemProxy */ = { 18 | isa = PBXContainerItemProxy; 19 | containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; 20 | proxyType = 1; 21 | remoteGlobalIDString = 5B294A95D33DB13134B8076884A62785; 22 | remoteInfo = ZWEmoji; 23 | }; 24 | /* End PBXContainerItemProxy section */ 25 | 26 | /* Begin PBXFileReference section */ 27 | 15C99D8E3D0986D3BE84389CDE704D9B /* Pods-QLMarkdownGFM.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-QLMarkdownGFM.release.xcconfig"; sourceTree = ""; }; 28 | 18BF167A9B72B81EFCA94FD24C94E1D8 /* libZWEmoji.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libZWEmoji.a; sourceTree = BUILT_PRODUCTS_DIR; }; 29 | 230B4DFF03785FF783FAF0C977909FC2 /* ZWEmoji.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = ZWEmoji.release.xcconfig; sourceTree = ""; }; 30 | 2AF92093891FF5644DE741B03FC9BB85 /* ZWEmoji-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ZWEmoji-prefix.pch"; sourceTree = ""; }; 31 | 433838E06825BCC494C5B79E2428F805 /* ZWEmoji.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = ZWEmoji.debug.xcconfig; sourceTree = ""; }; 32 | 6EC9B7A355914352529580E84FBEF64F /* libPods-QLMarkdownGFM.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-QLMarkdownGFM.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 33 | 822441EF7DD7778B0DCD1B9FB90958F1 /* ZWEmoji.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = ZWEmoji.m; path = lib/ZWEmoji.m; sourceTree = ""; }; 34 | 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 35 | B37F921C92D276BDF58B581B00A756EC /* Pods-QLMarkdownGFM.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-QLMarkdownGFM.debug.xcconfig"; sourceTree = ""; }; 36 | B418232B33E1FDD98FD9A04B2BD7D267 /* Pods-QLMarkdownGFM-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-QLMarkdownGFM-acknowledgements.markdown"; sourceTree = ""; }; 37 | CE1D14C39B4D423CEAC71EF2B391F13E /* ZWEmoji.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ZWEmoji.h; path = lib/ZWEmoji.h; sourceTree = ""; }; 38 | E99F4436597D22772A83796C27679795 /* Pods-QLMarkdownGFM-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-QLMarkdownGFM-dummy.m"; sourceTree = ""; }; 39 | EDD5C95368D18F235D50A775B6F5C722 /* ZWEmoji-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "ZWEmoji-dummy.m"; sourceTree = ""; }; 40 | F3499D353AC468011E58D83632414431 /* Pods-QLMarkdownGFM-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-QLMarkdownGFM-acknowledgements.plist"; sourceTree = ""; }; 41 | /* End PBXFileReference section */ 42 | 43 | /* Begin PBXFrameworksBuildPhase section */ 44 | 547E96E94834475E2426C167043ED30B /* Frameworks */ = { 45 | isa = PBXFrameworksBuildPhase; 46 | buildActionMask = 2147483647; 47 | files = ( 48 | ); 49 | runOnlyForDeploymentPostprocessing = 0; 50 | }; 51 | F195DFD9FFFDC7186B42285E609A3D6A /* Frameworks */ = { 52 | isa = PBXFrameworksBuildPhase; 53 | buildActionMask = 2147483647; 54 | files = ( 55 | ); 56 | runOnlyForDeploymentPostprocessing = 0; 57 | }; 58 | /* End PBXFrameworksBuildPhase section */ 59 | 60 | /* Begin PBXGroup section */ 61 | 03E2BA0F59E7C60216B7A57137B4FBA1 /* ZWEmoji */ = { 62 | isa = PBXGroup; 63 | children = ( 64 | CE1D14C39B4D423CEAC71EF2B391F13E /* ZWEmoji.h */, 65 | 822441EF7DD7778B0DCD1B9FB90958F1 /* ZWEmoji.m */, 66 | 64906F0E445317709D02AB701C7F0F17 /* Support Files */, 67 | ); 68 | path = ZWEmoji; 69 | sourceTree = ""; 70 | }; 71 | 097125D9FC9AA4EDB7BB60A2654CB34D /* Targets Support Files */ = { 72 | isa = PBXGroup; 73 | children = ( 74 | A308F03E8E2E13E0E24082B3B8452DE1 /* Pods-QLMarkdownGFM */, 75 | ); 76 | name = "Targets Support Files"; 77 | sourceTree = ""; 78 | }; 79 | 33DE25A5A9B8EF1FBD407DAF6BECC677 /* Pods */ = { 80 | isa = PBXGroup; 81 | children = ( 82 | 03E2BA0F59E7C60216B7A57137B4FBA1 /* ZWEmoji */, 83 | ); 84 | name = Pods; 85 | sourceTree = ""; 86 | }; 87 | 64906F0E445317709D02AB701C7F0F17 /* Support Files */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | EDD5C95368D18F235D50A775B6F5C722 /* ZWEmoji-dummy.m */, 91 | 2AF92093891FF5644DE741B03FC9BB85 /* ZWEmoji-prefix.pch */, 92 | 433838E06825BCC494C5B79E2428F805 /* ZWEmoji.debug.xcconfig */, 93 | 230B4DFF03785FF783FAF0C977909FC2 /* ZWEmoji.release.xcconfig */, 94 | ); 95 | name = "Support Files"; 96 | path = "../Target Support Files/ZWEmoji"; 97 | sourceTree = ""; 98 | }; 99 | A308F03E8E2E13E0E24082B3B8452DE1 /* Pods-QLMarkdownGFM */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | B418232B33E1FDD98FD9A04B2BD7D267 /* Pods-QLMarkdownGFM-acknowledgements.markdown */, 103 | F3499D353AC468011E58D83632414431 /* Pods-QLMarkdownGFM-acknowledgements.plist */, 104 | E99F4436597D22772A83796C27679795 /* Pods-QLMarkdownGFM-dummy.m */, 105 | B37F921C92D276BDF58B581B00A756EC /* Pods-QLMarkdownGFM.debug.xcconfig */, 106 | 15C99D8E3D0986D3BE84389CDE704D9B /* Pods-QLMarkdownGFM.release.xcconfig */, 107 | ); 108 | name = "Pods-QLMarkdownGFM"; 109 | path = "Target Support Files/Pods-QLMarkdownGFM"; 110 | sourceTree = ""; 111 | }; 112 | CF1408CF629C7361332E53B88F7BD30C = { 113 | isa = PBXGroup; 114 | children = ( 115 | 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, 116 | D89477F20FB1DE18A04690586D7808C4 /* Frameworks */, 117 | 33DE25A5A9B8EF1FBD407DAF6BECC677 /* Pods */, 118 | EC15E93C8D65013BB258C3B81C96A762 /* Products */, 119 | 097125D9FC9AA4EDB7BB60A2654CB34D /* Targets Support Files */, 120 | ); 121 | sourceTree = ""; 122 | }; 123 | D89477F20FB1DE18A04690586D7808C4 /* Frameworks */ = { 124 | isa = PBXGroup; 125 | children = ( 126 | ); 127 | name = Frameworks; 128 | sourceTree = ""; 129 | }; 130 | EC15E93C8D65013BB258C3B81C96A762 /* Products */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | 6EC9B7A355914352529580E84FBEF64F /* libPods-QLMarkdownGFM.a */, 134 | 18BF167A9B72B81EFCA94FD24C94E1D8 /* libZWEmoji.a */, 135 | ); 136 | name = Products; 137 | sourceTree = ""; 138 | }; 139 | /* End PBXGroup section */ 140 | 141 | /* Begin PBXHeadersBuildPhase section */ 142 | 2105B35CD532E437D0C59026E8EECA25 /* Headers */ = { 143 | isa = PBXHeadersBuildPhase; 144 | buildActionMask = 2147483647; 145 | files = ( 146 | 50D5D3033D2BC4F9C527CC43415542D3 /* ZWEmoji.h in Headers */, 147 | ); 148 | runOnlyForDeploymentPostprocessing = 0; 149 | }; 150 | DB82565E0D7185A46339F59BEBA74591 /* Headers */ = { 151 | isa = PBXHeadersBuildPhase; 152 | buildActionMask = 2147483647; 153 | files = ( 154 | ); 155 | runOnlyForDeploymentPostprocessing = 0; 156 | }; 157 | /* End PBXHeadersBuildPhase section */ 158 | 159 | /* Begin PBXNativeTarget section */ 160 | 5B294A95D33DB13134B8076884A62785 /* ZWEmoji */ = { 161 | isa = PBXNativeTarget; 162 | buildConfigurationList = 0821EB5E947A0624A4A9C776FDE5350D /* Build configuration list for PBXNativeTarget "ZWEmoji" */; 163 | buildPhases = ( 164 | 2105B35CD532E437D0C59026E8EECA25 /* Headers */, 165 | 1FF02F8926BAAB71A431F56F314F036C /* Sources */, 166 | 547E96E94834475E2426C167043ED30B /* Frameworks */, 167 | ); 168 | buildRules = ( 169 | ); 170 | dependencies = ( 171 | ); 172 | name = ZWEmoji; 173 | productName = ZWEmoji; 174 | productReference = 18BF167A9B72B81EFCA94FD24C94E1D8 /* libZWEmoji.a */; 175 | productType = "com.apple.product-type.library.static"; 176 | }; 177 | D54916B9270119D095A69EA5ED96C388 /* Pods-QLMarkdownGFM */ = { 178 | isa = PBXNativeTarget; 179 | buildConfigurationList = 3788A8DF2D00AB12E31A615D4FDE0BAB /* Build configuration list for PBXNativeTarget "Pods-QLMarkdownGFM" */; 180 | buildPhases = ( 181 | DB82565E0D7185A46339F59BEBA74591 /* Headers */, 182 | 7F164B7B9EBE6063A96FA86C549EE271 /* Sources */, 183 | F195DFD9FFFDC7186B42285E609A3D6A /* Frameworks */, 184 | ); 185 | buildRules = ( 186 | ); 187 | dependencies = ( 188 | 81354A392FE7416697D64777D9078C50 /* PBXTargetDependency */, 189 | ); 190 | name = "Pods-QLMarkdownGFM"; 191 | productName = "Pods-QLMarkdownGFM"; 192 | productReference = 6EC9B7A355914352529580E84FBEF64F /* libPods-QLMarkdownGFM.a */; 193 | productType = "com.apple.product-type.library.static"; 194 | }; 195 | /* End PBXNativeTarget section */ 196 | 197 | /* Begin PBXProject section */ 198 | BFDFE7DC352907FC980B868725387E98 /* Project object */ = { 199 | isa = PBXProject; 200 | attributes = { 201 | LastSwiftUpdateCheck = 1500; 202 | LastUpgradeCheck = 1500; 203 | }; 204 | buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; 205 | compatibilityVersion = "Xcode 9.3"; 206 | developmentRegion = en; 207 | hasScannedForEncodings = 0; 208 | knownRegions = ( 209 | Base, 210 | en, 211 | ); 212 | mainGroup = CF1408CF629C7361332E53B88F7BD30C; 213 | productRefGroup = EC15E93C8D65013BB258C3B81C96A762 /* Products */; 214 | projectDirPath = ""; 215 | projectRoot = ""; 216 | targets = ( 217 | D54916B9270119D095A69EA5ED96C388 /* Pods-QLMarkdownGFM */, 218 | 5B294A95D33DB13134B8076884A62785 /* ZWEmoji */, 219 | ); 220 | }; 221 | /* End PBXProject section */ 222 | 223 | /* Begin PBXSourcesBuildPhase section */ 224 | 1FF02F8926BAAB71A431F56F314F036C /* Sources */ = { 225 | isa = PBXSourcesBuildPhase; 226 | buildActionMask = 2147483647; 227 | files = ( 228 | FA404E79F4790BC931D42B5DBE908051 /* ZWEmoji.m in Sources */, 229 | D4262BCEBBDAEA17A1159FF7CBF99799 /* ZWEmoji-dummy.m in Sources */, 230 | ); 231 | runOnlyForDeploymentPostprocessing = 0; 232 | }; 233 | 7F164B7B9EBE6063A96FA86C549EE271 /* Sources */ = { 234 | isa = PBXSourcesBuildPhase; 235 | buildActionMask = 2147483647; 236 | files = ( 237 | E668F8BCD3CE3D1D567B6EDA0FA8EC22 /* Pods-QLMarkdownGFM-dummy.m in Sources */, 238 | ); 239 | runOnlyForDeploymentPostprocessing = 0; 240 | }; 241 | /* End PBXSourcesBuildPhase section */ 242 | 243 | /* Begin PBXTargetDependency section */ 244 | 81354A392FE7416697D64777D9078C50 /* PBXTargetDependency */ = { 245 | isa = PBXTargetDependency; 246 | name = ZWEmoji; 247 | target = 5B294A95D33DB13134B8076884A62785 /* ZWEmoji */; 248 | targetProxy = 37D9F972A041679AD4B3AE9DD9135855 /* PBXContainerItemProxy */; 249 | }; 250 | /* End PBXTargetDependency section */ 251 | 252 | /* Begin XCBuildConfiguration section */ 253 | 29C906FE5FB7ACDC680C6CC289EFF96E /* Debug */ = { 254 | isa = XCBuildConfiguration; 255 | buildSettings = { 256 | ALWAYS_SEARCH_USER_PATHS = NO; 257 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 258 | CLANG_ANALYZER_NONNULL = YES; 259 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 260 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 261 | CLANG_CXX_LIBRARY = "libc++"; 262 | CLANG_ENABLE_MODULES = YES; 263 | CLANG_ENABLE_OBJC_ARC = YES; 264 | CLANG_ENABLE_OBJC_WEAK = YES; 265 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 266 | CLANG_WARN_BOOL_CONVERSION = YES; 267 | CLANG_WARN_COMMA = YES; 268 | CLANG_WARN_CONSTANT_CONVERSION = YES; 269 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 270 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 271 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 272 | CLANG_WARN_EMPTY_BODY = YES; 273 | CLANG_WARN_ENUM_CONVERSION = YES; 274 | CLANG_WARN_INFINITE_RECURSION = YES; 275 | CLANG_WARN_INT_CONVERSION = YES; 276 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 277 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 278 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 279 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 280 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 281 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 282 | CLANG_WARN_STRICT_PROTOTYPES = YES; 283 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 284 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 285 | CLANG_WARN_UNREACHABLE_CODE = YES; 286 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 287 | COPY_PHASE_STRIP = NO; 288 | DEBUG_INFORMATION_FORMAT = dwarf; 289 | ENABLE_STRICT_OBJC_MSGSEND = YES; 290 | ENABLE_TESTABILITY = YES; 291 | GCC_C_LANGUAGE_STANDARD = gnu11; 292 | GCC_DYNAMIC_NO_PIC = NO; 293 | GCC_NO_COMMON_BLOCKS = YES; 294 | GCC_OPTIMIZATION_LEVEL = 0; 295 | GCC_PREPROCESSOR_DEFINITIONS = ( 296 | "POD_CONFIGURATION_DEBUG=1", 297 | "DEBUG=1", 298 | "$(inherited)", 299 | ); 300 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 301 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 302 | GCC_WARN_UNDECLARED_SELECTOR = YES; 303 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 304 | GCC_WARN_UNUSED_FUNCTION = YES; 305 | GCC_WARN_UNUSED_VARIABLE = YES; 306 | MACOSX_DEPLOYMENT_TARGET = 10.13; 307 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 308 | MTL_FAST_MATH = YES; 309 | ONLY_ACTIVE_ARCH = YES; 310 | PRODUCT_NAME = "$(TARGET_NAME)"; 311 | STRIP_INSTALLED_PRODUCT = NO; 312 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 313 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 314 | SWIFT_VERSION = 5.0; 315 | SYMROOT = "${SRCROOT}/../build"; 316 | }; 317 | name = Debug; 318 | }; 319 | 59909D53159D0E69D82D4AF65B5E5706 /* Release */ = { 320 | isa = XCBuildConfiguration; 321 | buildSettings = { 322 | ALWAYS_SEARCH_USER_PATHS = NO; 323 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 324 | CLANG_ANALYZER_NONNULL = YES; 325 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 326 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 327 | CLANG_CXX_LIBRARY = "libc++"; 328 | CLANG_ENABLE_MODULES = YES; 329 | CLANG_ENABLE_OBJC_ARC = YES; 330 | CLANG_ENABLE_OBJC_WEAK = YES; 331 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 332 | CLANG_WARN_BOOL_CONVERSION = YES; 333 | CLANG_WARN_COMMA = YES; 334 | CLANG_WARN_CONSTANT_CONVERSION = YES; 335 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 336 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 337 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 338 | CLANG_WARN_EMPTY_BODY = YES; 339 | CLANG_WARN_ENUM_CONVERSION = YES; 340 | CLANG_WARN_INFINITE_RECURSION = YES; 341 | CLANG_WARN_INT_CONVERSION = YES; 342 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 343 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 344 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 345 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 346 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 347 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 348 | CLANG_WARN_STRICT_PROTOTYPES = YES; 349 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 350 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 351 | CLANG_WARN_UNREACHABLE_CODE = YES; 352 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 353 | COPY_PHASE_STRIP = NO; 354 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 355 | ENABLE_NS_ASSERTIONS = NO; 356 | ENABLE_STRICT_OBJC_MSGSEND = YES; 357 | GCC_C_LANGUAGE_STANDARD = gnu11; 358 | GCC_NO_COMMON_BLOCKS = YES; 359 | GCC_PREPROCESSOR_DEFINITIONS = ( 360 | "POD_CONFIGURATION_RELEASE=1", 361 | "$(inherited)", 362 | ); 363 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 364 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 365 | GCC_WARN_UNDECLARED_SELECTOR = YES; 366 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 367 | GCC_WARN_UNUSED_FUNCTION = YES; 368 | GCC_WARN_UNUSED_VARIABLE = YES; 369 | MACOSX_DEPLOYMENT_TARGET = 10.13; 370 | MTL_ENABLE_DEBUG_INFO = NO; 371 | MTL_FAST_MATH = YES; 372 | PRODUCT_NAME = "$(TARGET_NAME)"; 373 | STRIP_INSTALLED_PRODUCT = NO; 374 | SWIFT_COMPILATION_MODE = wholemodule; 375 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 376 | SWIFT_VERSION = 5.0; 377 | SYMROOT = "${SRCROOT}/../build"; 378 | }; 379 | name = Release; 380 | }; 381 | 6896DD8248B1AAD96507CD3DDECEDCA6 /* Release */ = { 382 | isa = XCBuildConfiguration; 383 | baseConfigurationReference = 230B4DFF03785FF783FAF0C977909FC2 /* ZWEmoji.release.xcconfig */; 384 | buildSettings = { 385 | ARCHS = "$(ARCHS_STANDARD_64_BIT)"; 386 | CLANG_ENABLE_OBJC_WEAK = NO; 387 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 388 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 389 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 390 | EXECUTABLE_PREFIX = lib; 391 | GCC_PREFIX_HEADER = "Target Support Files/ZWEmoji/ZWEmoji-prefix.pch"; 392 | MACOSX_DEPLOYMENT_TARGET = 10.13; 393 | OTHER_LDFLAGS = ""; 394 | OTHER_LIBTOOLFLAGS = ""; 395 | PRIVATE_HEADERS_FOLDER_PATH = ""; 396 | PRODUCT_MODULE_NAME = ZWEmoji; 397 | PRODUCT_NAME = ZWEmoji; 398 | PUBLIC_HEADERS_FOLDER_PATH = ""; 399 | SDKROOT = macosx; 400 | SKIP_INSTALL = YES; 401 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 402 | }; 403 | name = Release; 404 | }; 405 | 89A3221B6B6E26DC5355904AEE232B8A /* Release */ = { 406 | isa = XCBuildConfiguration; 407 | baseConfigurationReference = 15C99D8E3D0986D3BE84389CDE704D9B /* Pods-QLMarkdownGFM.release.xcconfig */; 408 | buildSettings = { 409 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 410 | ARCHS = "$(ARCHS_STANDARD_64_BIT)"; 411 | CLANG_ENABLE_OBJC_WEAK = NO; 412 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 413 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 414 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 415 | EXECUTABLE_PREFIX = lib; 416 | MACH_O_TYPE = staticlib; 417 | MACOSX_DEPLOYMENT_TARGET = 10.13; 418 | OTHER_LDFLAGS = ""; 419 | OTHER_LIBTOOLFLAGS = ""; 420 | PODS_ROOT = "$(SRCROOT)"; 421 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 422 | SDKROOT = macosx; 423 | SKIP_INSTALL = YES; 424 | }; 425 | name = Release; 426 | }; 427 | A523F2844F717E1A8A28982F0F54B63F /* Debug */ = { 428 | isa = XCBuildConfiguration; 429 | baseConfigurationReference = 433838E06825BCC494C5B79E2428F805 /* ZWEmoji.debug.xcconfig */; 430 | buildSettings = { 431 | ARCHS = "$(ARCHS_STANDARD_64_BIT)"; 432 | CLANG_ENABLE_OBJC_WEAK = NO; 433 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 434 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 435 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 436 | EXECUTABLE_PREFIX = lib; 437 | GCC_PREFIX_HEADER = "Target Support Files/ZWEmoji/ZWEmoji-prefix.pch"; 438 | MACOSX_DEPLOYMENT_TARGET = 10.13; 439 | OTHER_LDFLAGS = ""; 440 | OTHER_LIBTOOLFLAGS = ""; 441 | PRIVATE_HEADERS_FOLDER_PATH = ""; 442 | PRODUCT_MODULE_NAME = ZWEmoji; 443 | PRODUCT_NAME = ZWEmoji; 444 | PUBLIC_HEADERS_FOLDER_PATH = ""; 445 | SDKROOT = macosx; 446 | SKIP_INSTALL = YES; 447 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 448 | }; 449 | name = Debug; 450 | }; 451 | D9739A31124BF17C4D1A1756DE39EDF7 /* Debug */ = { 452 | isa = XCBuildConfiguration; 453 | baseConfigurationReference = B37F921C92D276BDF58B581B00A756EC /* Pods-QLMarkdownGFM.debug.xcconfig */; 454 | buildSettings = { 455 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 456 | ARCHS = "$(ARCHS_STANDARD_64_BIT)"; 457 | CLANG_ENABLE_OBJC_WEAK = NO; 458 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 459 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 460 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 461 | EXECUTABLE_PREFIX = lib; 462 | MACH_O_TYPE = staticlib; 463 | MACOSX_DEPLOYMENT_TARGET = 10.13; 464 | OTHER_LDFLAGS = ""; 465 | OTHER_LIBTOOLFLAGS = ""; 466 | PODS_ROOT = "$(SRCROOT)"; 467 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 468 | SDKROOT = macosx; 469 | SKIP_INSTALL = YES; 470 | }; 471 | name = Debug; 472 | }; 473 | /* End XCBuildConfiguration section */ 474 | 475 | /* Begin XCConfigurationList section */ 476 | 0821EB5E947A0624A4A9C776FDE5350D /* Build configuration list for PBXNativeTarget "ZWEmoji" */ = { 477 | isa = XCConfigurationList; 478 | buildConfigurations = ( 479 | A523F2844F717E1A8A28982F0F54B63F /* Debug */, 480 | 6896DD8248B1AAD96507CD3DDECEDCA6 /* Release */, 481 | ); 482 | defaultConfigurationIsVisible = 0; 483 | defaultConfigurationName = Release; 484 | }; 485 | 3788A8DF2D00AB12E31A615D4FDE0BAB /* Build configuration list for PBXNativeTarget "Pods-QLMarkdownGFM" */ = { 486 | isa = XCConfigurationList; 487 | buildConfigurations = ( 488 | D9739A31124BF17C4D1A1756DE39EDF7 /* Debug */, 489 | 89A3221B6B6E26DC5355904AEE232B8A /* Release */, 490 | ); 491 | defaultConfigurationIsVisible = 0; 492 | defaultConfigurationName = Release; 493 | }; 494 | 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { 495 | isa = XCConfigurationList; 496 | buildConfigurations = ( 497 | 29C906FE5FB7ACDC680C6CC289EFF96E /* Debug */, 498 | 59909D53159D0E69D82D4AF65B5E5706 /* Release */, 499 | ); 500 | defaultConfigurationIsVisible = 0; 501 | defaultConfigurationName = Release; 502 | }; 503 | /* End XCConfigurationList section */ 504 | }; 505 | rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; 506 | } 507 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-QLMarkdownGFM/Pods-QLMarkdownGFM-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## ZWEmoji 5 | 6 | Copyright (c) 2012 Zach Waugh (http://zachwaugh.com) 7 | 8 | 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: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | 12 | 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. 13 | Generated by CocoaPods - https://cocoapods.org 14 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-QLMarkdownGFM/Pods-QLMarkdownGFM-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2012 Zach Waugh (http://zachwaugh.com) 18 | 19 | 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: 20 | 21 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 22 | 23 | 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. 24 | License 25 | MIT 26 | Title 27 | ZWEmoji 28 | Type 29 | PSGroupSpecifier 30 | 31 | 32 | FooterText 33 | Generated by CocoaPods - https://cocoapods.org 34 | Title 35 | 36 | Type 37 | PSGroupSpecifier 38 | 39 | 40 | StringsTable 41 | Acknowledgements 42 | Title 43 | Acknowledgements 44 | 45 | 46 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-QLMarkdownGFM/Pods-QLMarkdownGFM-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_QLMarkdownGFM : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_QLMarkdownGFM 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-QLMarkdownGFM/Pods-QLMarkdownGFM-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then 7 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # frameworks to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 13 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 14 | 15 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" 16 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 17 | 18 | # Used as a return value for each invocation of `strip_invalid_archs` function. 19 | STRIP_BINARY_RETVAL=0 20 | 21 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 22 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 23 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 24 | 25 | # Copies and strips a vendored framework 26 | install_framework() 27 | { 28 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 29 | local source="${BUILT_PRODUCTS_DIR}/$1" 30 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 31 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 32 | elif [ -r "$1" ]; then 33 | local source="$1" 34 | fi 35 | 36 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 37 | 38 | if [ -L "${source}" ]; then 39 | echo "Symlinked..." 40 | source="$(readlink "${source}")" 41 | fi 42 | 43 | # Use filter instead of exclude so missing patterns don't throw errors. 44 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 45 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 46 | 47 | local basename 48 | basename="$(basename -s .framework "$1")" 49 | binary="${destination}/${basename}.framework/${basename}" 50 | if ! [ -r "$binary" ]; then 51 | binary="${destination}/${basename}" 52 | fi 53 | 54 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 55 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 56 | strip_invalid_archs "$binary" 57 | fi 58 | 59 | # Resign the code if required by the build settings to avoid unstable apps 60 | code_sign_if_enabled "${destination}/$(basename "$1")" 61 | 62 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 63 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 64 | local swift_runtime_libs 65 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 66 | for lib in $swift_runtime_libs; do 67 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 68 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 69 | code_sign_if_enabled "${destination}/${lib}" 70 | done 71 | fi 72 | } 73 | 74 | # Copies and strips a vendored dSYM 75 | install_dsym() { 76 | local source="$1" 77 | if [ -r "$source" ]; then 78 | # Copy the dSYM into a the targets temp dir. 79 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" 80 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" 81 | 82 | local basename 83 | basename="$(basename -s .framework.dSYM "$source")" 84 | binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" 85 | 86 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 87 | if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then 88 | strip_invalid_archs "$binary" 89 | fi 90 | 91 | if [[ $STRIP_BINARY_RETVAL == 1 ]]; then 92 | # Move the stripped file into its final destination. 93 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" 94 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" 95 | else 96 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. 97 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" 98 | fi 99 | fi 100 | } 101 | 102 | # Signs a framework with the provided identity 103 | code_sign_if_enabled() { 104 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 105 | # Use the current code_sign_identitiy 106 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 107 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" 108 | 109 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 110 | code_sign_cmd="$code_sign_cmd &" 111 | fi 112 | echo "$code_sign_cmd" 113 | eval "$code_sign_cmd" 114 | fi 115 | } 116 | 117 | # Strip invalid architectures 118 | strip_invalid_archs() { 119 | binary="$1" 120 | # Get architectures for current target binary 121 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 122 | # Intersect them with the architectures we are building for 123 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 124 | # If there are no archs supported by this binary then warn the user 125 | if [[ -z "$intersected_archs" ]]; then 126 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 127 | STRIP_BINARY_RETVAL=0 128 | return 129 | fi 130 | stripped="" 131 | for arch in $binary_archs; do 132 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 133 | # Strip non-valid architectures in-place 134 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 135 | stripped="$stripped $arch" 136 | fi 137 | done 138 | if [[ "$stripped" ]]; then 139 | echo "Stripped $binary of architectures:$stripped" 140 | fi 141 | STRIP_BINARY_RETVAL=1 142 | } 143 | 144 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 145 | wait 146 | fi 147 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-QLMarkdownGFM/Pods-QLMarkdownGFM-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then 7 | # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # resources to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 13 | 14 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 15 | > "$RESOURCES_TO_COPY" 16 | 17 | XCASSET_FILES=() 18 | 19 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 20 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 21 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 22 | 23 | case "${TARGETED_DEVICE_FAMILY:-}" in 24 | 1,2) 25 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 26 | ;; 27 | 1) 28 | TARGET_DEVICE_ARGS="--target-device iphone" 29 | ;; 30 | 2) 31 | TARGET_DEVICE_ARGS="--target-device ipad" 32 | ;; 33 | 3) 34 | TARGET_DEVICE_ARGS="--target-device tv" 35 | ;; 36 | 4) 37 | TARGET_DEVICE_ARGS="--target-device watch" 38 | ;; 39 | *) 40 | TARGET_DEVICE_ARGS="--target-device mac" 41 | ;; 42 | esac 43 | 44 | install_resource() 45 | { 46 | if [[ "$1" = /* ]] ; then 47 | RESOURCE_PATH="$1" 48 | else 49 | RESOURCE_PATH="${PODS_ROOT}/$1" 50 | fi 51 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 52 | cat << EOM 53 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 54 | EOM 55 | exit 1 56 | fi 57 | case $RESOURCE_PATH in 58 | *.storyboard) 59 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 60 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 61 | ;; 62 | *.xib) 63 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 64 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 65 | ;; 66 | *.framework) 67 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 68 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 69 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 70 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 71 | ;; 72 | *.xcdatamodel) 73 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 74 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 75 | ;; 76 | *.xcdatamodeld) 77 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 78 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 79 | ;; 80 | *.xcmappingmodel) 81 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true 82 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 83 | ;; 84 | *.xcassets) 85 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 86 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 87 | ;; 88 | *) 89 | echo "$RESOURCE_PATH" || true 90 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 91 | ;; 92 | esac 93 | } 94 | 95 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 96 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 97 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 98 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 99 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 100 | fi 101 | rm -f "$RESOURCES_TO_COPY" 102 | 103 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] 104 | then 105 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 106 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 107 | while read line; do 108 | if [[ $line != "${PODS_ROOT}*" ]]; then 109 | XCASSET_FILES+=("$line") 110 | fi 111 | done <<<"$OTHER_XCASSETS" 112 | 113 | if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then 114 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 115 | else 116 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" 117 | fi 118 | fi 119 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-QLMarkdownGFM/Pods-QLMarkdownGFM.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/ZWEmoji" 4 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ZWEmoji" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"ZWEmoji" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 11 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 12 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-QLMarkdownGFM/Pods-QLMarkdownGFM.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/ZWEmoji" 4 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ZWEmoji" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"ZWEmoji" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 11 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 12 | -------------------------------------------------------------------------------- /Pods/Target Support Files/ZWEmoji/ZWEmoji-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_ZWEmoji : NSObject 3 | @end 4 | @implementation PodsDummy_ZWEmoji 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/ZWEmoji/ZWEmoji-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/ZWEmoji/ZWEmoji.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ZWEmoji 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/ZWEmoji" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/ZWEmoji" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 8 | PODS_ROOT = ${SRCROOT} 9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/ZWEmoji 10 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 11 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 12 | SKIP_INSTALL = YES 13 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 14 | -------------------------------------------------------------------------------- /Pods/Target Support Files/ZWEmoji/ZWEmoji.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ZWEmoji 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/ZWEmoji" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/ZWEmoji" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 8 | PODS_ROOT = ${SRCROOT} 9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/ZWEmoji 10 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 11 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 12 | SKIP_INSTALL = YES 13 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 14 | -------------------------------------------------------------------------------- /Pods/Target Support Files/ZWEmoji/ZWEmoji.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ZWEmoji 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/ZWEmoji" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/ZWEmoji" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/ZWEmoji 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Pods/ZWEmoji/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Zach Waugh (http://zachwaugh.com) 2 | 3 | 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: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | 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. -------------------------------------------------------------------------------- /Pods/ZWEmoji/README.md: -------------------------------------------------------------------------------- 1 | # ZWEmoji 2 | 3 | ZWEmoji is a library for using emoji based on emoji codes used in Campfire/GitHub, documented here: [http://emoji-cheat-sheet.com](http://emoji-cheat-sheet.com). It can be used to go back and forth between the emoji codes and their unicode representation. This code was extracted from and currently used in [Flint](http://giantcomet.com/flint). 4 | 5 | ## Usage 6 | 7 | All the functionality is contained in a single class `ZWEmoji` 8 | 9 | The main calls are to replace codes with unicode and vice versa. 10 | 11 | ### Example 12 | 13 | ``` 14 | NSString *string = @"This is a string with some emoji codes :smile: and :cry:"; 15 | 16 | // Convert codes to unicode 17 | NSString *replaced = [ZWEmoji emojify:string]; 18 | 19 | // And back 20 | NSString *reversed = [ZWEmoji unemojify:replaced]; 21 | 22 | ``` 23 | 24 | ## Demo 25 | 26 | There is a demo app that displays all the emoji and their codes in a table, and also contains the tests 27 | 28 | ## Data 29 | 30 | There is a CSV file that stores all the emoji codes along with their unicode representation in data/emoji.csv, and a script to export that to Objective-C in scripts/export.rb. Currently, exporting involves exporting to the clipboard and pasting into ZWEmoji.m to replace the dictionary. Should probably export to a separate data file that gets loaded at runtime, but this is simpler for now as I want the lib to be a single class 31 | 32 | ## To Do 33 | 34 | - On [emoji cheat sheet](http://emoji-cheat-sheet.com) and in OS X emoji picker (Edit > Special Characters > Emoji in almost any text editor), the emoji are grouped by category. I want to add those categories to the database. 35 | - Write a script to compare against [emoji cheat sheet](http://emoji-cheat-sheet.com) and [Gemoji](http://github.com/github/gemoji) to ensure we have full support 36 | 37 | ## Notes 38 | 39 | There are currently 18 emoji listed in [emoji cheat sheet](http://emoji-cheat-sheet.com) that this library doesn't support because they're not part of the unicode standard or I couldn't find a match. They are: 40 | 41 | - 109 42 | - bowtie 43 | - feelsgood 44 | - finnadie 45 | - goberserk 46 | - godmode 47 | - hurtrealbad 48 | - metal 49 | - neckbeard 50 | - octocat 51 | - rage1 52 | - rage2 53 | - rage3 54 | - rage4 55 | - shipit 56 | - squirrel 57 | - suspect 58 | - trollface 59 | 60 | They're still included in the library, but are just replaced with themselves, so you can replace them with images if you want. 61 | 62 | ## License 63 | 64 | Licensed under the MIT license. 65 | 66 | Copyright (c) 2012 Zach Waugh 67 | 68 | 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: 69 | 70 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 71 | 72 | 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. 73 | 74 | -------------------------------------------------------------------------------- /Pods/ZWEmoji/lib/ZWEmoji.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZWEmoji.h 3 | // ZWEmoji 4 | // 5 | // Created by Zach Waugh on 8/31/12. 6 | // Copyright (c) 2012 Zach Waugh. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | extern NSString * const ZWEmojiStringKey; 12 | extern NSString * const ZWEmojiReplacedEmojiKey; 13 | 14 | @interface ZWEmoji : NSObject 15 | 16 | // Dictionary keyed by :: 17 | + (NSDictionary *)codes; 18 | 19 | // Dictionary keyed by unicode emoji character 20 | + (NSDictionary *)emojis; 21 | 22 | // Return unicode character for emoji :: 23 | + (NSString *)emojiForCode:(NSString *)code; 24 | 25 | // Return :: for emoji unicode character 26 | + (NSString *)codeForEmoji:(NSString *)emoji; 27 | 28 | // Replace codes with emoji unicode characters 29 | + (NSString *)emojify:(NSString *)string; 30 | 31 | // Returns a dictionary that holds a string and array of emojis that were replaced 32 | // useful if you need the ranges of all the replacements 33 | + (NSDictionary *)emojifyAndReturnData:(NSString *)string; 34 | 35 | // Replace emoji unicode characters with codes, allows users to input emoji directly 36 | // without having to worry about the code 37 | + (NSString *)unemojify:(NSString *)string; 38 | 39 | // Replace emoji unicode characters with codes, ignoring anything in ignore 40 | // This is useful when you don't want to replace characters like TM with their emoji equivalent 41 | + (NSString *)unemojify:(NSString *)string ignore:(NSSet *)ignore; 42 | 43 | @end 44 | 45 | // Convenience category for emojifying a string 46 | @interface NSString (ZWEmoji) 47 | 48 | // Returns new string with all emoji codes replaced with their unicode equivalent 49 | - (NSString *)zw_emojify; 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Pods/ZWEmoji/lib/ZWEmoji.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZWEmoji.m 3 | // ZWEmoji 4 | // 5 | // Created by Zach Waugh on 8/31/12. 6 | // Copyright (c) 2012 Zach Waugh. All rights reserved. 7 | // 8 | 9 | #import "ZWEmoji.h" 10 | 11 | NSString * const ZWEmojiStringKey = @"string"; 12 | NSString * const ZWEmojiReplacedEmojiKey = @"emojis"; 13 | 14 | static NSDictionary *_emojis = nil; 15 | static NSDictionary *_codes = nil; 16 | 17 | // Convenience category 18 | @implementation NSString (ZWEmoji) 19 | 20 | - (NSString *)zw_emojify 21 | { 22 | return [ZWEmoji emojify:self]; 23 | } 24 | 25 | @end 26 | 27 | @implementation ZWEmoji 28 | 29 | #pragma mark - Lookup 30 | 31 | + (NSDictionary *)emojis 32 | { 33 | return _emojis; 34 | } 35 | 36 | + (NSDictionary *)codes 37 | { 38 | return _codes; 39 | } 40 | 41 | + (NSString *)codeForEmoji:(NSString *)emoji 42 | { 43 | return _emojis[emoji]; 44 | } 45 | 46 | + (NSString *)emojiForCode:(NSString *)code 47 | { 48 | return _codes[code]; 49 | } 50 | 51 | #pragma mark - Replacement 52 | 53 | // Replace emoji unicode (\U0001F44D) with Campfire codes (:thumbsup:) 54 | + (NSString *)unemojify:(NSString *)string 55 | { 56 | return [self unemojify:string ignore:nil]; 57 | } 58 | 59 | + (NSString *)unemojify:(NSString *)string ignore:(NSSet *)ignore 60 | { 61 | if (![string isEqual:[NSNull null]] && string.length > 0) { 62 | NSMutableString *emojiString = [string mutableCopy]; 63 | 64 | for (NSString *emoji in _emojis) { 65 | if (![ignore containsObject:emoji]) { 66 | [emojiString replaceOccurrencesOfString:emoji withString:_emojis[emoji] options:NSCaseInsensitiveSearch range:NSMakeRange(0, [emojiString length])]; 67 | } 68 | } 69 | 70 | return emojiString; 71 | } 72 | 73 | return string; 74 | } 75 | 76 | // Replace codes (:thumbsup:) with emoji unicode (\U0001F44D) 77 | + (NSString *)emojify:(NSString *)string 78 | { 79 | if (![string isEqual:[NSNull null]] && string.length > 0) { 80 | NSDictionary *dict = [ZWEmoji emojifyAndReturnData:string]; 81 | return dict[ZWEmojiStringKey]; 82 | } 83 | return string; 84 | } 85 | 86 | // More info, returns string and a list of the all the emoji that were replaced 87 | + (NSDictionary *)emojifyAndReturnData:(NSString *)string 88 | { 89 | // Return right away if no emoji codes in string 90 | if ([string rangeOfString:@":"].location == NSNotFound) { 91 | return @{ ZWEmojiStringKey: string }; 92 | } 93 | 94 | NSArray *matches = [self.emojiCodeRegularExpression matchesInString:string options:0 range:NSMakeRange(0, string.length)]; 95 | NSMutableString *emojiString = [string mutableCopy]; 96 | NSMutableSet *replacedEmoji = [NSMutableSet set]; 97 | 98 | // Loop through matches in reverse order so the ranges won't be affected 99 | for (NSTextCheckingResult *match in [matches reverseObjectEnumerator]) { 100 | NSString *word = [string substringWithRange:match.range]; 101 | NSString *emoji = [self emojiForCode:word]; 102 | 103 | if (emoji) { 104 | if (![replacedEmoji containsObject:emoji]) { 105 | [replacedEmoji addObject:emoji]; 106 | } 107 | 108 | [emojiString replaceCharactersInRange:match.range withString:emoji]; 109 | } 110 | } 111 | 112 | return @{ ZWEmojiStringKey: emojiString, ZWEmojiReplacedEmojiKey: replacedEmoji }; 113 | } 114 | 115 | #pragma mark - 116 | 117 | + (NSRegularExpression *)emojiCodeRegularExpression 118 | { 119 | static NSRegularExpression *regex = nil; 120 | static dispatch_once_t onceToken; 121 | dispatch_once(&onceToken, ^{ 122 | regex = [NSRegularExpression regularExpressionWithPattern:@":[a-z0-9_+-]+:" options:NSRegularExpressionCaseInsensitive error:nil]; 123 | }); 124 | 125 | return regex; 126 | } 127 | 128 | + (void)initialize 129 | { 130 | _codes = @{@":+1:": @"\U0001F44D", 131 | @":-1:": @"\U0001F44E", 132 | @":0:": [NSString stringWithFormat:@"%C%C", (unichar)0x0030, (unichar)0x20E3], 133 | @":1:": [NSString stringWithFormat:@"%C%C", (unichar)0x0031, (unichar)0x20E3], 134 | @":100:": @"\U0001F4AF", 135 | @":109:": @":109:", 136 | @":1234:": @"\U0001F522", 137 | @":2:": [NSString stringWithFormat:@"%C%C", (unichar)0x0032, (unichar)0x20E3], 138 | @":3:": [NSString stringWithFormat:@"%C%C", (unichar)0x0033, (unichar)0x20E3], 139 | @":4:": [NSString stringWithFormat:@"%C%C", (unichar)0x0034, (unichar)0x20E3], 140 | @":5:": [NSString stringWithFormat:@"%C%C", (unichar)0x0035, (unichar)0x20E3], 141 | @":6:": [NSString stringWithFormat:@"%C%C", (unichar)0x0036, (unichar)0x20E3], 142 | @":7:": [NSString stringWithFormat:@"%C%C", (unichar)0x0037, (unichar)0x20E3], 143 | @":8:": [NSString stringWithFormat:@"%C%C", (unichar)0x0038, (unichar)0x20E3], 144 | @":8ball:": @"\U0001F3B1", 145 | @":9:": [NSString stringWithFormat:@"%C%C", (unichar)0x0039, (unichar)0x20E3], 146 | @":a:": @"\U0001F170", 147 | @":ab:": @"\U0001F18E", 148 | @":abc:": @"\U0001F524", 149 | @":abcd:": @"\U0001F521", 150 | @":accept:": @"\U0001F251", 151 | @":aerial_tramway:": @"\U0001F6A1", 152 | @":airplane:": @"\u2708", 153 | @":alarm_clock:": @"\u23F0", 154 | @":alien:": @"\U0001F47D", 155 | @":ambulance:": @"\U0001F691", 156 | @":anchor:": @"\u2693", 157 | @":angel:": @"\U0001F47C", 158 | @":anger:": @"\U0001F4A2", 159 | @":angry:": @"\U0001F620", 160 | @":anguished:": @"\U0001F627", 161 | @":ant:": @"\U0001F41C", 162 | @":apple:": @"\U0001F34E", 163 | @":aquarius:": @"\u2652", 164 | @":aries:": @"\u2648", 165 | @":arrow_backward:": @"\u25C0", 166 | @":arrow_double_down:": @"\u23EC", 167 | @":arrow_double_up:": @"\u23EB", 168 | @":arrow_down:": @"\u2B07", 169 | @":arrow_down_small:": @"\U0001F53D", 170 | @":arrow_forward:": @"\u25B6", 171 | @":arrow_heading_down:": @"\u2935", 172 | @":arrow_heading_up:": @"\u2934", 173 | @":arrow_left:": @"\u2B05", 174 | @":arrow_lower_left:": @"\u2199", 175 | @":arrow_lower_right:": @"\u2198", 176 | @":arrow_right:": @"\u27A1", 177 | @":arrow_right_hook:": @"\u21AA", 178 | @":arrow_up:": @"\u2B06", 179 | @":arrow_up_down:": @"\u2195", 180 | @":arrow_up_small:": @"\U0001F53C", 181 | @":arrow_upper_left:": @"\u2196", 182 | @":arrow_upper_right:": @"\u2197", 183 | @":arrows_clockwise:": @"\U0001F503", 184 | @":arrows_counterclockwise:": @"\U0001F504", 185 | @":art:": @"\U0001F3A8", 186 | @":articulated_lorry:": @"\U0001F69B", 187 | @":astonished:": @"\U0001F632", 188 | @":atm:": @"\U0001F3E7", 189 | @":b:": @"\U0001F171", 190 | @":baby:": @"\U0001F476", 191 | @":baby_bottle:": @"\U0001F37C", 192 | @":baby_chick:": @"\U0001F424", 193 | @":baby_symbol:": @"\U0001F6BC", 194 | @":back:": @"\U0001F519", 195 | @":baggage_claim:": @"\U0001F6C4", 196 | @":balloon:": @"\U0001F388", 197 | @":ballot_box_with_check:": @"\u2611", 198 | @":bamboo:": @"\U0001F38D", 199 | @":banana:": @"\U0001F34C", 200 | @":bangbang:": @"\u203C", 201 | @":bank:": @"\U0001F3E6", 202 | @":bar_chart:": @"\U0001F4CA", 203 | @":barber:": @"\U0001F488", 204 | @":baseball:": @"\u26BE", 205 | @":basketball:": @"\U0001F3C0", 206 | @":bath:": @"\U0001F6C0", 207 | @":bathtub:": @"\U0001F6C1", 208 | @":battery:": @"\U0001F50B", 209 | @":bear:": @"\U0001F43B", 210 | @":bee:": @"\U0001F41D", 211 | @":beer:": @"\U0001F37A", 212 | @":beers:": @"\U0001F37B", 213 | @":beetle:": @"\U0001F41E", 214 | @":beginner:": @"\U0001F530", 215 | @":bell:": @"\U0001F514", 216 | @":bento:": @"\U0001F371", 217 | @":bicyclist:": @"\U0001F6B4", 218 | @":bike:": @"\U0001F6B2", 219 | @":bikini:": @"\U0001F459", 220 | @":bird:": @"\U0001F426", 221 | @":birthday:": @"\U0001F382", 222 | @":black_circle:": @"\u26AB", 223 | @":black_joker:": @"\U0001F0CF", 224 | @":black_large_square:": @"\u2B1B", 225 | @":black_medium_small_square:": @"\u25FE", 226 | @":black_medium_square:": @"\u25FC", 227 | @":black_nib:": @"\u2712", 228 | @":black_small_square:": @"\u25AA", 229 | @":black_square_button:": @"\U0001F532", 230 | @":blossom:": @"\U0001F33C", 231 | @":blowfish:": @"\U0001F421", 232 | @":blue_book:": @"\U0001F4D8", 233 | @":blue_car:": @"\U0001F699", 234 | @":blue_heart:": @"\U0001F499", 235 | @":blush:": @"\U0001F60A", 236 | @":boar:": @"\U0001F417", 237 | @":boat:": @"\u26F5", 238 | @":bomb:": @"\U0001F4A3", 239 | @":book:": @"\U0001F4D6", 240 | @":bookmark:": @"\U0001F516", 241 | @":bookmark_tabs:": @"\U0001F4D1", 242 | @":books:": @"\U0001F4DA", 243 | @":boom:": @"\U0001F4A5", 244 | @":boot:": @"\U0001F462", 245 | @":bouquet:": @"\U0001F490", 246 | @":bow:": @"\U0001F647", 247 | @":bowling:": @"\U0001F3B3", 248 | @":bowtie:": @":bowtie:", 249 | @":boy:": @"\U0001F466", 250 | @":bread:": @"\U0001F35E", 251 | @":bride_with_veil:": @"\U0001F470", 252 | @":bridge_at_night:": @"\U0001F309", 253 | @":briefcase:": @"\U0001F4BC", 254 | @":broken_heart:": @"\U0001F494", 255 | @":bug:": @"\U0001F41B", 256 | @":bulb:": @"\U0001F4A1", 257 | @":bullettrain_front:": @"\U0001F685", 258 | @":bullettrain_side:": @"\U0001F684", 259 | @":bus:": @"\U0001F68C", 260 | @":busstop:": @"\U0001F68F", 261 | @":bust_in_silhouette:": @"\U0001F464", 262 | @":busts_in_silhouette:": @"\U0001F465", 263 | @":cactus:": @"\U0001F335", 264 | @":cake:": @"\U0001F370", 265 | @":calendar:": @"\U0001F4C6", 266 | @":calling:": @"\U0001F4F2", 267 | @":camel:": @"\U0001F42B", 268 | @":camera:": @"\U0001F4F7", 269 | @":cancer:": @"\u264B", 270 | @":candy:": @"\U0001F36C", 271 | @":capital_abcd:": @"\U0001F520", 272 | @":capricorn:": @"\u2651", 273 | @":car:": @"\U0001F697", 274 | @":card_index:": @"\U0001F4C7", 275 | @":carousel_horse:": @"\U0001F3A0", 276 | @":cat:": @"\U0001F431", 277 | @":cat2:": @"\U0001F408", 278 | @":cd:": @"\U0001F4BF", 279 | @":chart:": @"\U0001F4B9", 280 | @":chart_with_downwards_trend:": @"\U0001F4C9", 281 | @":chart_with_upwards_trend:": @"\U0001F4C8", 282 | @":checkered_flag:": @"\U0001F3C1", 283 | @":cherries:": @"\U0001F352", 284 | @":cherry_blossom:": @"\U0001F338", 285 | @":chestnut:": @"\U0001F330", 286 | @":chicken:": @"\U0001F414", 287 | @":children_crossing:": @"\U0001F6B8", 288 | @":chocolate_bar:": @"\U0001F36B", 289 | @":christmas_tree:": @"\U0001F384", 290 | @":church:": @"\u26EA", 291 | @":cinema:": @"\U0001F3A6", 292 | @":circus_tent:": @"\U0001F3AA", 293 | @":city_sunrise:": @"\U0001F307", 294 | @":city_sunset:": @"\U0001F306", 295 | @":cl:": @"\U0001F191", 296 | @":clap:": @"\U0001F44F", 297 | @":clapper:": @"\U0001F3AC", 298 | @":clipboard:": @"\U0001F4CB", 299 | @":clock1:": @"\U0001F550", 300 | @":clock10:": @"\U0001F559", 301 | @":clock1030:": @"\U0001F565", 302 | @":clock11:": @"\U0001F55A", 303 | @":clock1130:": @"\U0001F566", 304 | @":clock12:": @"\U0001F55B", 305 | @":clock1230:": @"\U0001F567", 306 | @":clock130:": @"\U0001F55C", 307 | @":clock2:": @"\U0001F551", 308 | @":clock230:": @"\U0001F55D", 309 | @":clock3:": @"\U0001F552", 310 | @":clock330:": @"\U0001F55E", 311 | @":clock4:": @"\U0001F553", 312 | @":clock430:": @"\U0001F55F", 313 | @":clock5:": @"\U0001F554", 314 | @":clock530:": @"\U0001F560", 315 | @":clock6:": @"\U0001F555", 316 | @":clock630:": @"\U0001F561", 317 | @":clock7:": @"\U0001F556", 318 | @":clock730:": @"\U0001F562", 319 | @":clock8:": @"\U0001F557", 320 | @":clock830:": @"\U0001F563", 321 | @":clock9:": @"\U0001F558", 322 | @":clock930:": @"\U0001F564", 323 | @":closed_book:": @"\U0001F4D5", 324 | @":closed_lock_with_key:": @"\U0001F510", 325 | @":closed_umbrella:": @"\U0001F302", 326 | @":cloud:": @"\u2601", 327 | @":clubs:": @"\u2663", 328 | @":cn:": [NSString stringWithFormat:@"\U0001F1E8\U0001F1F3"], 329 | @":cocktail:": @"\U0001F378", 330 | @":coffee:": @"\u2615", 331 | @":cold_sweat:": @"\U0001F630", 332 | @":collision:": @"\U0001F4A5", 333 | @":computer:": @"\U0001F4BB", 334 | @":confetti_ball:": @"\U0001F38A", 335 | @":confounded:": @"\U0001F616", 336 | @":confused:": @"\U0001F615", 337 | @":congratulations:": @"\u3297", 338 | @":construction:": @"\U0001F6A7", 339 | @":construction_worker:": @"\U0001F477", 340 | @":convenience_store:": @"\U0001F3EA", 341 | @":cookie:": @"\U0001F36A", 342 | @":cool:": @"\U0001F192", 343 | @":cop:": @"\U0001F46E", 344 | @":copyright:": @"\u00A9", 345 | @":corn:": @"\U0001F33D", 346 | @":couple:": @"\U0001F46B", 347 | @":couple_with_heart:": @"\U0001F491", 348 | @":couplekiss:": @"\U0001F48F", 349 | @":cow:": @"\U0001F42E", 350 | @":cow2:": @"\U0001F404", 351 | @":credit_card:": @"\U0001F4B3", 352 | @":crescent_moon:": @"\U0001F319", 353 | @":crocodile:": @"\U0001F40A", 354 | @":crossed_flags:": @"\U0001F38C", 355 | @":crown:": @"\U0001F451", 356 | @":cry:": @"\U0001F622", 357 | @":crying_cat_face:": @"\U0001F63F", 358 | @":crystal_ball:": @"\U0001F52E", 359 | @":cupid:": @"\U0001F498", 360 | @":curly_loop:": @"\u27B0", 361 | @":currency_exchange:": @"\U0001F4B1", 362 | @":curry:": @"\U0001F35B", 363 | @":custard:": @"\U0001F36E", 364 | @":customs:": @"\U0001F6C3", 365 | @":cyclone:": @"\U0001F300", 366 | @":dancer:": @"\U0001F483", 367 | @":dancers:": @"\U0001F46F", 368 | @":dango:": @"\U0001F361", 369 | @":dart:": @"\U0001F3AF", 370 | @":dash:": @"\U0001F4A8", 371 | @":date:": @"\U0001F4C5", 372 | @":de:": [NSString stringWithFormat:@"\U0001F1E9\U0001F1EA"], 373 | @":deciduous_tree:": @"\U0001F333", 374 | @":department_store:": @"\U0001F3EC", 375 | @":diamond_shape_with_a_dot_inside:": @"\U0001F4A0", 376 | @":diamonds:": @"\u2666", 377 | @":disappointed:": @"\U0001F61E", 378 | @":disappointed_relieved:": @"\U0001F625", 379 | @":dizzy:": @"\U0001F4AB", 380 | @":dizzy_face:": @"\U0001F635", 381 | @":do_not_litter:": @"\U0001F6AF", 382 | @":dog:": @"\U0001F436", 383 | @":dog2:": @"\U0001F415", 384 | @":dollar:": @"\U0001F4B5", 385 | @":dolls:": @"\U0001F38E", 386 | @":dolphin:": @"\U0001F42C", 387 | @":door:": @"\U0001F6AA", 388 | @":doughnut:": @"\U0001F369", 389 | @":dragon:": @"\U0001F409", 390 | @":dragon_face:": @"\U0001F432", 391 | @":dress:": @"\U0001F457", 392 | @":dromedary_camel:": @"\U0001F42A", 393 | @":droplet:": @"\U0001F4A7", 394 | @":dvd:": @"\U0001F4C0", 395 | @":e-mail:": @"\U0001F4E7", 396 | @":ear:": @"\U0001F442", 397 | @":ear_of_rice:": @"\U0001F33E", 398 | @":earth_africa:": @"\U0001F30D", 399 | @":earth_americas:": @"\U0001F30E", 400 | @":earth_asia:": @"\U0001F30F", 401 | @":egg:": @"\U0001F373", 402 | @":eggplant:": @"\U0001F346", 403 | @":eight:": [NSString stringWithFormat:@"%C%C", (unichar)0x0038, (unichar)0x20E3], 404 | @":eight_pointed_black_star:": @"\u2734", 405 | @":eight_spoked_asterisk:": @"\u2733", 406 | @":electric_plug:": @"\U0001F50C", 407 | @":elephant:": @"\U0001F418", 408 | @":email:": @"\U0001F4E9", 409 | @":end:": @"\U0001F51A", 410 | @":envelope:": @"\u2709", 411 | @":es:": [NSString stringWithFormat:@"\U0001F1EA\U0001F1F8"], 412 | @":euro:": @"\U0001F4B6", 413 | @":european_castle:": @"\U0001F3F0", 414 | @":european_post_office:": @"\U0001F3E4", 415 | @":evergreen_tree:": @"\U0001F332", 416 | @":exclamation:": @"\u2755", 417 | @":expressionless:": @"\U0001F611", 418 | @":eyeglasses:": @"\U0001F453", 419 | @":eyes:": @"\U0001F440", 420 | @":facepunch:": @"\U0001F44A", 421 | @":factory:": @"\U0001F3ED", 422 | @":fallen_leaf:": @"\U0001F342", 423 | @":family:": @"\U0001F46A", 424 | @":fast_forward:": @"\u23E9", 425 | @":fax:": @"\U0001F4E0", 426 | @":fearful:": @"\U0001F628", 427 | @":feelsgood:": @":feelsgood:", 428 | @":feet:": @"\U0001F463", 429 | @":ferris_wheel:": @"\U0001F3A1", 430 | @":file_folder:": @"\U0001F4C1", 431 | @":finnadie:": @":finnadie:", 432 | @":fire:": @"\U0001F525", 433 | @":fire_engine:": @"\U0001F692", 434 | @":fireworks:": @"\U0001F386", 435 | @":first_quarter_moon:": @"\U0001F313", 436 | @":first_quarter_moon_with_face:": @"\U0001F31B", 437 | @":fish:": @"\U0001F41F", 438 | @":fish_cake:": @"\U0001F365", 439 | @":fishing_pole_and_fish:": @"\U0001F3A3", 440 | @":fist:": @"\u270A", 441 | @":five:": [NSString stringWithFormat:@"%C%C", (unichar)0x0035, (unichar)0x20E3], 442 | @":flags:": @"\U0001F38F", 443 | @":flashlight:": @"\U0001F526", 444 | @":floppy_disk:": @"\U0001F4BE", 445 | @":flower_playing_cards:": @"\U0001F3B4", 446 | @":flushed:": @"\U0001F633", 447 | @":foggy:": @"\U0001F301", 448 | @":football:": @"\U0001F3C8", 449 | @":fork_and_knife:": @"\U0001F374", 450 | @":fountain:": @"\u26F2", 451 | @":four:": [NSString stringWithFormat:@"%C%C", (unichar)0x0034, (unichar)0x20E3], 452 | @":four_leaf_clover:": @"\U0001F340", 453 | @":fr:": [NSString stringWithFormat:@"\U0001F1EB\U0001F1F7"], 454 | @":free:": @"\U0001F193", 455 | @":fried_shrimp:": @"\U0001F364", 456 | @":fries:": @"\U0001F35F", 457 | @":frog:": @"\U0001F438", 458 | @":frowning:": @"\U0001F626", 459 | @":fuelpump:": @"\u26FD", 460 | @":full_moon:": @"\U0001F315", 461 | @":full_moon_with_face:": @"\U0001F31D", 462 | @":game_die:": @"\U0001F3B2", 463 | @":gb:": [NSString stringWithFormat:@"\U0001F1EC\U0001F1E7"], 464 | @":gem:": @"\U0001F48E", 465 | @":gemini:": @"\u264A", 466 | @":ghost:": @"\U0001F47B", 467 | @":gift:": @"\U0001F381", 468 | @":gift_heart:": @"\U0001F49D", 469 | @":girl:": @"\U0001F467", 470 | @":globe_with_meridians:": @"\U0001F310", 471 | @":goat:": @"\U0001F410", 472 | @":goberserk:": @":goberserk:", 473 | @":godmode:": @":godmode:", 474 | @":golf:": @"\u26F3", 475 | @":grapes:": @"\U0001F347", 476 | @":green_apple:": @"\U0001F34F", 477 | @":green_book:": @"\U0001F4D7", 478 | @":green_heart:": @"\U0001F49A", 479 | @":grey_exclamation:": @"\u2755", 480 | @":grey_question:": @"\u2754", 481 | @":grimacing:": @"\U0001F62C", 482 | @":grin:": @"\U0001F601", 483 | @":grinning:": @"\U0001F600", 484 | @":guardsman:": @"\U0001F482", 485 | @":guitar:": @"\U0001F3B8", 486 | @":gun:": @"\U0001F52B", 487 | @":haircut:": @"\U0001F487", 488 | @":hamburger:": @"\U0001F354", 489 | @":hammer:": @"\U0001F528", 490 | @":hamster:": @"\U0001F439", 491 | @":hand:": @"\u270B", 492 | @":handbag:": @"\U0001F45C", 493 | @":hankey:": @"\U0001F4A9", 494 | @":hash:": [NSString stringWithFormat:@"%C%C", (unichar)0x0023, (unichar)0x20E3], 495 | @":hatched_chick:": @"\U0001F425", 496 | @":hatching_chick:": @"\U0001F423", 497 | @":headphones:": @"\U0001F3A7", 498 | @":hear_no_evil:": @"\U0001F649", 499 | @":heart:": @"\u2764", 500 | @":heart_decoration:": @"\U0001F49F", 501 | @":heart_eyes:": @"\U0001F60D", 502 | @":heart_eyes_cat:": @"\U0001F63B", 503 | @":heartbeat:": @"\U0001F493", 504 | @":heartpulse:": @"\U0001F497", 505 | @":hearts:": @"\u2665", 506 | @":heavy_check_mark:": @"\u2714", 507 | @":heavy_division_sign:": @"\u2797", 508 | @":heavy_dollar_sign:": @"\U0001F4B2", 509 | @":heavy_exclamation_mark:": @"\u2757", 510 | @":heavy_minus_sign:": @"\u2796", 511 | @":heavy_multiplication_x:": @"\u2716", 512 | @":heavy_plus_sign:": @"\u2795", 513 | @":helicopter:": @"\U0001F681", 514 | @":herb:": @"\U0001F33F", 515 | @":hibiscus:": @"\U0001F33A", 516 | @":high_brightness:": @"\U0001F506", 517 | @":high_heel:": @"\U0001F460", 518 | @":hocho:": @"\U0001F52A", 519 | @":honey_pot:": @"\U0001F36F", 520 | @":honeybee:": @"\U0001F41D", 521 | @":horse:": @"\U0001F434", 522 | @":horse_racing:": @"\U0001F3C7", 523 | @":hospital:": @"\U0001F3E5", 524 | @":hotel:": @"\U0001F3E8", 525 | @":hotsprings:": @"\u2668", 526 | @":hourglass:": @"\u23F3", 527 | @":hourglass_flowing_sand:": @"\u23F3", 528 | @":house:": @"\U0001F3E0", 529 | @":house_with_garden:": @"\U0001F3E1", 530 | @":hurtrealbad:": @":hurtrealbad:", 531 | @":hushed:": @"\U0001F62F", 532 | @":ice_cream:": @"\U0001F368", 533 | @":icecream:": @"\U0001F366", 534 | @":id:": @"\U0001F194", 535 | @":ideograph_advantage:": @"\U0001F250", 536 | @":imp:": @"\U0001F47F", 537 | @":inbox_tray:": @"\U0001F4E5", 538 | @":incoming_envelope:": @"\U0001F4E8", 539 | @":information_desk_person:": @"\U0001F481", 540 | @":information_source:": @"\u2139", 541 | @":innocent:": @"\U0001F607", 542 | @":interrobang:": @"\u2049", 543 | @":iphone:": @"\U0001F4F1", 544 | @":it:": [NSString stringWithFormat:@"\U0001F1EE\U0001F1F9"], 545 | @":izakaya_lantern:": @"\U0001F3EE", 546 | @":jack_o_lantern:": @"\U0001F383", 547 | @":japan:": @"\U0001F5FE", 548 | @":japanese_castle:": @"\U0001F3EF", 549 | @":japanese_goblin:": @"\U0001F47A", 550 | @":japanese_ogre:": @"\U0001F479", 551 | @":jeans:": @"\U0001F456", 552 | @":joy:": @"\U0001F602", 553 | @":joy_cat:": @"\U0001F639", 554 | @":jp:": [NSString stringWithFormat:@"\U0001F1EF\U0001F1F5"], 555 | @":key:": @"\U0001F511", 556 | @":keycap_ten:": @"\U0001F51F", 557 | @":kimono:": @"\U0001F458", 558 | @":kiss:": @"\U0001F48B", 559 | @":kissing:": @"\U0001F617", 560 | @":kissing_cat:": @"\U0001F63D", 561 | @":kissing_closed_eyes:": @"\U0001F61A", 562 | @":kissing_face:": @"\U0001F61A", 563 | @":kissing_heart:": @"\U0001F618", 564 | @":kissing_smiling_eyes:": @"\U0001F619", 565 | @":koala:": @"\U0001F428", 566 | @":koko:": @"\U0001F201", 567 | @":kr:": [NSString stringWithFormat:@"\U0001F1F0\U0001F1F7"], 568 | @":large_blue_circle:": @"\U0001F535", 569 | @":large_blue_diamond:": @"\U0001F537", 570 | @":large_orange_diamond:": @"\U0001F536", 571 | @":last_quarter_moon:": @"\U0001F317", 572 | @":last_quarter_moon_with_face:": @"\U0001F31C", 573 | @":laughing:": @"\U0001F606", 574 | @":leaves:": @"\U0001F343", 575 | @":ledger:": @"\U0001F4D2", 576 | @":left_luggage:": @"\U0001F6C5", 577 | @":left_right_arrow:": @"\u2194", 578 | @":leftwards_arrow_with_hook:": @"\u21A9", 579 | @":lemon:": @"\U0001F34B", 580 | @":leo:": @"\u264C", 581 | @":leopard:": @"\U0001F406", 582 | @":libra:": @"\u264E", 583 | @":light_rail:": @"\U0001F688", 584 | @":link:": @"\U0001F517", 585 | @":lips:": @"\U0001F444", 586 | @":lipstick:": @"\U0001F484", 587 | @":lock:": @"\U0001F512", 588 | @":lock_with_ink_pen:": @"\U0001F50F", 589 | @":lollipop:": @"\U0001F36D", 590 | @":loop:": @"\u27BF", 591 | @":loudspeaker:": @"\U0001F4E2", 592 | @":love_hotel:": @"\U0001F3E9", 593 | @":love_letter:": @"\U0001F48C", 594 | @":low_brightness:": @"\U0001F505", 595 | @":m:": @"\u24C2", 596 | @":mag:": @"\U0001F50D", 597 | @":mag_right:": @"\U0001F50E", 598 | @":mahjong:": @"\U0001F004", 599 | @":mailbox:": @"\U0001F4EB", 600 | @":mailbox_closed:": @"\U0001F4EA", 601 | @":mailbox_with_mail:": @"\U0001F4EC", 602 | @":mailbox_with_no_mail:": @"\U0001F4ED", 603 | @":man:": @"\U0001F468", 604 | @":man_with_gua_pi_mao:": @"\U0001F472", 605 | @":man_with_turban:": @"\U0001F473", 606 | @":mans_shoe:": @"\U0001F45E", 607 | @":maple_leaf:": @"\U0001F341", 608 | @":mask:": @"\U0001F637", 609 | @":massage:": @"\U0001F486", 610 | @":meat_on_bone:": @"\U0001F356", 611 | @":mega:": @"\U0001F4E3", 612 | @":melon:": @"\U0001F348", 613 | @":memo:": @"\U0001F4DD", 614 | @":mens:": @"\U0001F6B9", 615 | @":metal:": @":metal:", 616 | @":metro:": @"\U0001F687", 617 | @":microphone:": @"\U0001F3A4", 618 | @":microscope:": @"\U0001F52C", 619 | @":milky_way:": @"\U0001F30C", 620 | @":minibus:": @"\U0001F690", 621 | @":minidisc:": @"\U0001F4BD", 622 | @":mobile_phone_off:": @"\U0001F4F4", 623 | @":money_with_wings:": @"\U0001F4B8", 624 | @":moneybag:": @"\U0001F4B0", 625 | @":monkey:": @"\U0001F412", 626 | @":monkey_face:": @"\U0001F435", 627 | @":monorail:": @"\U0001F69D", 628 | @":moon:": @"\U0001F319", 629 | @":mortar_board:": @"\U0001F393", 630 | @":mount_fuji:": @"\U0001F5FB", 631 | @":mountain_bicyclist:": @"\U0001F6B5", 632 | @":mountain_cableway:": @"\U0001F6A0", 633 | @":mountain_railway:": @"\U0001F69E", 634 | @":mouse:": @"\U0001F42D", 635 | @":mouse2:": @"\U0001F401", 636 | @":movie_camera:": @"\U0001F3A5", 637 | @":moyai:": @"\U0001F5FF", 638 | @":muscle:": @"\U0001F4AA", 639 | @":mushroom:": @"\U0001F344", 640 | @":musical_keyboard:": @"\U0001F3B9", 641 | @":musical_note:": @"\U0001F3B5", 642 | @":musical_score:": @"\U0001F3BC", 643 | @":mute:": @"\U0001F507", 644 | @":nail_care:": @"\U0001F485", 645 | @":name_badge:": @"\U0001F4DB", 646 | @":neckbeard:": @":neckbeard:", 647 | @":necktie:": @"\U0001F454", 648 | @":negative_squared_cross_mark:": @"\u274E", 649 | @":neutral_face:": @"\U0001F610", 650 | @":new:": @"\U0001F195", 651 | @":new_moon:": @"\U0001F311", 652 | @":new_moon_with_face:": @"\U0001F31A", 653 | @":newspaper:": @"\U0001F4F0", 654 | @":ng:": @"\U0001F196", 655 | @":nine:": [NSString stringWithFormat:@"%C%C", (unichar)0x0039, (unichar)0x20E3], 656 | @":no_bell:": @"\U0001F515", 657 | @":no_bicycles:": @"\U0001F6B3", 658 | @":no_entry:": @"\u26D4", 659 | @":no_entry_sign:": @"\U0001F6AB", 660 | @":no_good:": @"\U0001F645", 661 | @":no_mobile_phones:": @"\U0001F4F5", 662 | @":no_mouth:": @"\U0001F636", 663 | @":no_pedestrians:": @"\U0001F6B7", 664 | @":no_smoking:": @"\U0001F6AD", 665 | @":non-potable_water:": @"\U0001F6B1", 666 | @":nose:": @"\U0001F443", 667 | @":notebook:": @"\U0001F4D3", 668 | @":notebook_with_decorative_cover:": @"\U0001F4D4", 669 | @":notes:": @"\U0001F3B6", 670 | @":nut_and_bolt:": @"\U0001F529", 671 | @":o:": @"\u2B55", 672 | @":o2:": @"\U0001F17E", 673 | @":ocean:": @"\U0001F30A", 674 | @":octocat:": @":octocat:", 675 | @":octopus:": @"\U0001F419", 676 | @":oden:": @"\U0001F362", 677 | @":office:": @"\U0001F3E2", 678 | @":ok:": @"\U0001F197", 679 | @":ok_hand:": @"\U0001F44C", 680 | @":ok_woman:": @"\U0001F646", 681 | @":older_man:": @"\U0001F474", 682 | @":older_woman:": @"\U0001F475", 683 | @":on:": @"\U0001F51B", 684 | @":oncoming_automobile:": @"\U0001F698", 685 | @":oncoming_bus:": @"\U0001F68D", 686 | @":oncoming_police_car:": @"\U0001F694", 687 | @":oncoming_taxi:": @"\U0001F696", 688 | @":one:": [NSString stringWithFormat:@"%C%C", (unichar)0x0031, (unichar)0x20E3], 689 | @":open_file_folder:": @"\U0001F4C2", 690 | @":open_hands:": @"\U0001F450", 691 | @":open_mouth:": @"\U0001F62E", 692 | @":ophiuchus:": @"\u26CE", 693 | @":orange_book:": @"\U0001F4D9", 694 | @":outbox_tray:": @"\U0001F4E4", 695 | @":ox:": @"\U0001F402", 696 | @":package:": @"\U0001F4E6", 697 | @":page_facing_up:": @"\U0001F4C4", 698 | @":page_with_curl:": @"\U0001F4C3", 699 | @":pager:": @"\U0001F4DF", 700 | @":palm_tree:": @"\U0001F334", 701 | @":panda_face:": @"\U0001F43C", 702 | @":paperclip:": @"\U0001F4CE", 703 | @":parking:": @"\U0001F17F", 704 | @":part_alternation_mark:": @"\u303D", 705 | @":partly_sunny:": @"\u26C5", 706 | @":passport_control:": @"\U0001F6C2", 707 | @":paw_prints:": @"\U0001F43E", 708 | @":peach:": @"\U0001F351", 709 | @":pear:": @"\U0001F350", 710 | @":pencil:": @"\U0001F4DD", 711 | @":pencil2:": @"\u270F", 712 | @":penguin:": @"\U0001F427", 713 | @":pensive:": @"\U0001F614", 714 | @":performing_arts:": @"\U0001F3AD", 715 | @":persevere:": @"\U0001F623", 716 | @":person_frowning:": @"\U0001F64D", 717 | @":person_with_blond_hair:": @"\U0001F471", 718 | @":person_with_pouting_face:": @"\U0001F64E", 719 | @":phone:": @"\u260E", 720 | @":pig:": @"\U0001F437", 721 | @":pig2:": @"\U0001F416", 722 | @":pig_nose:": @"\U0001F43D", 723 | @":pill:": @"\U0001F48A", 724 | @":pineapple:": @"\U0001F34D", 725 | @":pisces:": @"\u2653", 726 | @":pizza:": @"\U0001F355", 727 | @":point_down:": @"\U0001F447", 728 | @":point_left:": @"\U0001F448", 729 | @":point_right:": @"\U0001F449", 730 | @":point_up:": @"\u261D", 731 | @":point_up_2:": @"\U0001F446", 732 | @":police_car:": @"\U0001F693", 733 | @":poodle:": @"\U0001F429", 734 | @":poop:": @"\U0001F4A9", 735 | @":post_office:": @"\U0001F3E3", 736 | @":postal_horn:": @"\U0001F4EF", 737 | @":postbox:": @"\U0001F4EE", 738 | @":potable_water:": @"\U0001F6B0", 739 | @":pouch:": @"\U0001F45D", 740 | @":poultry_leg:": @"\U0001F357", 741 | @":pound:": @"\U0001F4B7", 742 | @":pouting_cat:": @"\U0001F63E", 743 | @":pray:": @"\U0001F64F", 744 | @":princess:": @"\U0001F478", 745 | @":punch:": @"\U0001F44A", 746 | @":purple_heart:": @"\U0001F49C", 747 | @":purse:": @"\U0001F45B", 748 | @":pushpin:": @"\U0001F4CC", 749 | @":put_litter_in_its_place:": @"\U0001F6AE", 750 | @":question:": @"\u2754", 751 | @":rabbit:": @"\U0001F430", 752 | @":rabbit2:": @"\U0001F407", 753 | @":racehorse:": @"\U0001F40E", 754 | @":radio:": @"\U0001F4FB", 755 | @":radio_button:": @"\U0001F518", 756 | @":rage:": @"\U0001F621", 757 | @":rage1:": @":rage1:", 758 | @":rage2:": @":rage2:", 759 | @":rage3:": @":rage3:", 760 | @":rage4:": @":rage4:", 761 | @":railway_car:": @"\U0001F683", 762 | @":rainbow:": @"\U0001F308", 763 | @":raised_hand:": @"\u270B", 764 | @":raised_hands:": @"\U0001F64C", 765 | @":raising_hand:": @"\U0001F64B", 766 | @":ram:": @"\U0001F40F", 767 | @":ramen:": @"\U0001F35C", 768 | @":rat:": @"\U0001F400", 769 | @":recycle:": @"\u267B", 770 | @":red_car:": @"\U0001F697", 771 | @":red_circle:": @"\U0001F534", 772 | @":registered:": @"\u00AE", 773 | @":relaxed:": @"\u263A", 774 | @":relieved:": @"\U0001F625", 775 | @":repeat:": @"\U0001F501", 776 | @":repeat_one:": @"\U0001F502", 777 | @":restroom:": @"\U0001F6BB", 778 | @":revolving_hearts:": @"\U0001F49E", 779 | @":rewind:": @"\u23EA", 780 | @":ribbon:": @"\U0001F380", 781 | @":rice:": @"\U0001F35A", 782 | @":rice_ball:": @"\U0001F359", 783 | @":rice_cracker:": @"\U0001F358", 784 | @":rice_scene:": @"\U0001F391", 785 | @":ring:": @"\U0001F48D", 786 | @":rocket:": @"\U0001F680", 787 | @":roller_coaster:": @"\U0001F3A2", 788 | @":rooster:": @"\U0001F413", 789 | @":rose:": @"\U0001F339", 790 | @":rotating_light:": @"\U0001F6A8", 791 | @":round_pushpin:": @"\U0001F4CD", 792 | @":rowboat:": @"\U0001F6A3", 793 | @":ru:": [NSString stringWithFormat:@"\U0001F1F7\U0001F1FA"], 794 | @":rugby_football:": @"\U0001F3C9", 795 | @":runner:": @"\U0001F3C3", 796 | @":running:": @"\U0001F3C3", 797 | @":running_shirt_with_sash:": @"\U0001F3BD", 798 | @":sa:": @"\U0001F202", 799 | @":sagittarius:": @"\u2650", 800 | @":sailboat:": @"\u26F5", 801 | @":sake:": @"\U0001F376", 802 | @":sandal:": @"\U0001F461", 803 | @":santa:": @"\U0001F385", 804 | @":satellite:": @"\U0001F4E1", 805 | @":satisfied:": @"\U0001F60C", 806 | @":saxophone:": @"\U0001F3B7", 807 | @":school:": @"\U0001F3EB", 808 | @":school_satchel:": @"\U0001F392", 809 | @":scissors:": @"\u2702", 810 | @":scorpius:": @"\u264F", 811 | @":scream:": @"\U0001F631", 812 | @":scream_cat:": @"\U0001F640", 813 | @":scroll:": @"\U0001F4DC", 814 | @":seat:": @"\U0001F4BA", 815 | @":secret:": @"\u3299", 816 | @":see_no_evil:": @"\U0001F648", 817 | @":seedling:": @"\U0001F331", 818 | @":seven:": [NSString stringWithFormat:@"%C%C", (unichar)0x0037, (unichar)0x20E3], 819 | @":shaved_ice:": @"\U0001F367", 820 | @":sheep:": @"\U0001F411", 821 | @":shell:": @"\U0001F41A", 822 | @":ship:": @"\U0001F6A2", 823 | @":shipit:": @":shipit:", 824 | @":shirt:": @"\U0001F455", 825 | @":shit:": @"\U0001F4A9", 826 | @":shoe:": @"\U0001F45F", 827 | @":shower:": @"\U0001F6BF", 828 | @":signal_strength:": @"\U0001F4F6", 829 | @":simple_smile:": @"\U0001F642", 830 | @":six:": [NSString stringWithFormat:@"%C%C", (unichar)0x0036, (unichar)0x20E3], 831 | @":six_pointed_star:": @"\U0001F52F", 832 | @":ski:": @"\U0001F3BF", 833 | @":skull:": @"\U0001F480", 834 | @":sleeping:": @"\U0001F634", 835 | @":sleepy:": @"\U0001F62A", 836 | @":slot_machine:": @"\U0001F3B0", 837 | @":small_blue_diamond:": @"\U0001F539", 838 | @":small_orange_diamond:": @"\U0001F538", 839 | @":small_red_triangle:": @"\U0001F53A", 840 | @":small_red_triangle_down:": @"\U0001F53B", 841 | @":smile:": @"\U0001F604", 842 | @":smile_cat:": @"\U0001F638", 843 | @":smiley:": @"\U0001F603", 844 | @":smiley_cat:": @"\U0001F63A", 845 | @":smiling_imp:": @"\U0001F608", 846 | @":smirk:": @"\U0001F60F", 847 | @":smirk_cat:": @"\U0001F63C", 848 | @":smoking:": @"\U0001F6AC", 849 | @":snail:": @"\U0001F40C", 850 | @":snake:": @"\U0001F40D", 851 | @":snowboarder:": @"\U0001F3C2", 852 | @":snowflake:": @"\u2744", 853 | @":snowman:": @"\u26C4", 854 | @":sob:": @"\U0001F62D", 855 | @":soccer:": @"\u26BD", 856 | @":soon:": @"\U0001F51C", 857 | @":sos:": @"\U0001F198", 858 | @":sound:": @"\U0001F509", 859 | @":space_invader:": @"\U0001F47E", 860 | @":spades:": @"\u2660", 861 | @":spaghetti:": @"\U0001F35D", 862 | @":sparkler:": @"\U0001F387", 863 | @":sparkles:": @"\u2728", 864 | @":sparkling_heart:": @"\U0001F496", 865 | @":speak_no_evil:": @"\U0001F64A", 866 | @":speaker:": @"\U0001F50A", 867 | @":speech_balloon:": @"\U0001F4AC", 868 | @":speedboat:": @"\U0001F6A4", 869 | @":squirrel:": @":squirrel:", 870 | @":star:": @"\U0001F31F", 871 | @":star2:": @"\U0001F31F", 872 | @":stars:": @"\U0001F303", 873 | @":station:": @"\U0001F689", 874 | @":statue_of_liberty:": @"\U0001F5FD", 875 | @":steam_locomotive:": @"\U0001F682", 876 | @":stew:": @"\U0001F372", 877 | @":straight_ruler:": @"\U0001F4CF", 878 | @":strawberry:": @"\U0001F353", 879 | @":stuck_out_tongue:": @"\U0001F61B", 880 | @":stuck_out_tongue_closed_eyes:": @"\U0001F61D", 881 | @":stuck_out_tongue_winking_eye:": @"\U0001F61C", 882 | @":sun_with_face:": @"\U0001F31E", 883 | @":sunflower:": @"\U0001F33B", 884 | @":sunglasses:": @"\U0001F60E", 885 | @":sunny:": @"\u2600", 886 | @":sunrise:": @"\U0001F305", 887 | @":sunrise_over_mountains:": @"\U0001F304", 888 | @":surfer:": @"\U0001F3C4", 889 | @":sushi:": @"\U0001F363", 890 | @":suspect:": @":suspect:", 891 | @":suspension_railway:": @"\U0001F69F", 892 | @":sweat:": @"\U0001F613", 893 | @":sweat_drops:": @"\U0001F4A6", 894 | @":sweat_smile:": @"\U0001F605", 895 | @":sweet_potato:": @"\U0001F360", 896 | @":swimmer:": @"\U0001F3CA", 897 | @":symbols:": @"\U0001F523", 898 | @":syringe:": @"\U0001F489", 899 | @":tada:": @"\U0001F389", 900 | @":tanabata_tree:": @"\U0001F38B", 901 | @":tangerine:": @"\U0001F34A", 902 | @":taurus:": @"\u2649", 903 | @":taxi:": @"\U0001F695", 904 | @":tea:": @"\U0001F375", 905 | @":telephone:": @"\u260E", 906 | @":telephone_receiver:": @"\U0001F4DE", 907 | @":telescope:": @"\U0001F52D", 908 | @":tennis:": @"\U0001F3BE", 909 | @":tent:": @"\u26FA", 910 | @":thought_balloon:": @"\U0001F4AD", 911 | @":three:": [NSString stringWithFormat:@"%C%C", (unichar)0x0033, (unichar)0x20E3], 912 | @":thumbsdown:": @"\U0001F44E", 913 | @":thumbsup:": @"\U0001F44D", 914 | @":ticket:": @"\U0001F3AB", 915 | @":tiger:": @"\U0001F42F", 916 | @":tiger2:": @"\U0001F405", 917 | @":tired_face:": @"\U0001F62B", 918 | @":tm:": @"\u2122", 919 | @":toilet:": @"\U0001F6BD", 920 | @":tokyo_tower:": @"\U0001F5FC", 921 | @":tomato:": @"\U0001F345", 922 | @":tongue:": @"\U0001F61D", 923 | @":tongue2:": @"\U0001F445", 924 | @":top:": @"\U0001F51D", 925 | @":tophat:": @"\U0001F3A9", 926 | @":tractor:": @"\U0001F69C", 927 | @":traffic_light:": @"\U0001F6A5", 928 | @":train:": @"\U0001F683", 929 | @":train2:": @"\U0001F686", 930 | @":tram:": @"\U0001F68A", 931 | @":triangular_flag_on_post:": @"\U0001F6A9", 932 | @":triangular_ruler:": @"\U0001F4D0", 933 | @":trident:": @"\U0001F531", 934 | @":triumph:": @"\U0001F624", 935 | @":trolleybus:": @"\U0001F68E", 936 | @":trollface:": @":trollface:", 937 | @":trophy:": @"\U0001F3C6", 938 | @":tropical_drink:": @"\U0001F379", 939 | @":tropical_fish:": @"\U0001F420", 940 | @":truck:": @"\U0001F69A", 941 | @":trumpet:": @"\U0001F3BA", 942 | @":tshirt:": @"\U0001F455", 943 | @":tulip:": @"\U0001F337", 944 | @":turtle:": @"\U0001F422", 945 | @":tv:": @"\U0001F4FA", 946 | @":twisted_rightwards_arrows:": @"\U0001F500", 947 | @":two:": [NSString stringWithFormat:@"%C%C", (unichar)0x0032, (unichar)0x20E3], 948 | @":two_hearts:": @"\U0001F495", 949 | @":two_men_holding_hands:": @"\U0001F46C", 950 | @":two_women_holding_hands:": @"\U0001F46D", 951 | @":u5272:": @"\U0001F239", 952 | @":u5408:": @"\U0001F234", 953 | @":u55b6:": @"\U0001F23A", 954 | @":u6307:": @"\U0001F22F", 955 | @":u6708:": @"\U0001F237", 956 | @":u6709:": @"\U0001F236", 957 | @":u6e80:": @"\U0001F235", 958 | @":u7121:": @"\U0001F21A", 959 | @":u7533:": @"\U0001F238", 960 | @":u7981:": @"\U0001F232", 961 | @":u7a7a:": @"\U0001F233", 962 | @":uk:": [NSString stringWithFormat:@"%C%C%C%C", (unichar)0xD83C, (unichar)0xDDEC, (unichar)0xD83C, (unichar)0xDDE7], 963 | @":umbrella:": @"\u2614", 964 | @":unamused:": @"\U0001F612", 965 | @":underage:": @"\U0001F51E", 966 | @":unlock:": @"\U0001F513", 967 | @":up:": @"\U0001F199", 968 | @":us:": [NSString stringWithFormat:@"\U0001F1FA\U0001F1F8"], 969 | @":v:": @"\u270C", 970 | @":vertical_traffic_light:": @"\U0001F6A6", 971 | @":vhs:": @"\U0001F4FC", 972 | @":vibration_mode:": @"\U0001F4F3", 973 | @":video_camera:": @"\U0001F4F9", 974 | @":video_game:": @"\U0001F3AE", 975 | @":violin:": @"\U0001F3BB", 976 | @":virgo:": @"\u264D", 977 | @":volcano:": @"\U0001F30B", 978 | @":vs:": @"\U0001F19A", 979 | @":walking:": @"\U0001F6B6", 980 | @":waning_crescent_moon:": @"\U0001F318", 981 | @":waning_gibbous_moon:": @"\U0001F316", 982 | @":warning:": @"\u26A0", 983 | @":watch:": @"\u231A", 984 | @":water_buffalo:": @"\U0001F403", 985 | @":watermelon:": @"\U0001F349", 986 | @":wave:": @"\U0001F44B", 987 | @":wavy_dash:": @"\u3030", 988 | @":waxing_crescent_moon:": @"\U0001F312", 989 | @":waxing_gibbous_moon:": @"\U0001F314", 990 | @":wc:": @"\U0001F6BE", 991 | @":weary:": @"\U0001F629", 992 | @":wedding:": @"\U0001F492", 993 | @":whale:": @"\U0001F433", 994 | @":whale2:": @"\U0001F40B", 995 | @":wheelchair:": @"\u267F", 996 | @":white_check_mark:": @"\u2705", 997 | @":white_circle:": @"\u26AA", 998 | @":white_flower:": @"\U0001F4AE", 999 | @":white_large_square:": @"\u2B1C", 1000 | @":white_medium_small_square:": @"\u25FD", 1001 | @":white_medium_square:": @"\u25FB", 1002 | @":white_small_square:": @"\u25AB", 1003 | @":white_square_button:": @"\U0001F533", 1004 | @":wind_chime:": @"\U0001F390", 1005 | @":wine_glass:": @"\U0001F377", 1006 | @":wink:": @"\U0001F609", 1007 | @":wink2:": @"\U0001F61C", 1008 | @":wolf:": @"\U0001F43A", 1009 | @":woman:": @"\U0001F469", 1010 | @":womans_clothes:": @"\U0001F45A", 1011 | @":womans_hat:": @"\U0001F452", 1012 | @":womens:": @"\U0001F6BA", 1013 | @":worried:": @"\U0001F61F", 1014 | @":wrench:": @"\U0001F527", 1015 | @":x:": @"\u274C", 1016 | @":yellow_heart:": @"\U0001F49B", 1017 | @":yen:": @"\U0001F4B4", 1018 | @":yum:": @"\U0001F60B", 1019 | @":zap:": @"\u26A1", 1020 | @":zero:": [NSString stringWithFormat:@"%C%C", (unichar)0x0030, (unichar)0x20E3], 1021 | @":zzz:": @"\U0001F4A4"}; 1022 | 1023 | // Build dictionary keyed by unicode representation for easy replacement 1024 | NSMutableDictionary *emojis = [[NSMutableDictionary alloc] init]; 1025 | 1026 | [_codes enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) { 1027 | emojis[obj] = key; 1028 | }]; 1029 | 1030 | _emojis = emojis; 1031 | } 1032 | 1033 | @end 1034 | -------------------------------------------------------------------------------- /QLMarkdownGFM.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 9044FA23FF8A0EB6A982BAA2 /* libPods-QLMarkdownGFM.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D6418EA6C4F01551C7DC91F /* libPods-QLMarkdownGFM.a */; }; 11 | A90BB4A1230865A8004BB0E1 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A90BB4A0230865A8004BB0E1 /* Cocoa.framework */; }; 12 | A9493949207A37EE0086053A /* styles.css in Resources */ = {isa = PBXBuildFile; fileRef = A9493948207A37ED0086053A /* styles.css */; }; 13 | A9789C08213A86C70077C0D4 /* libcmark-gfm.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9EB9E9D207A51D800BAE9F7 /* libcmark-gfm.a */; }; 14 | A9789C0A213A86C70077C0D4 /* libcmark-gfm-extensions.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9789C09213A86C70077C0D4 /* libcmark-gfm-extensions.a */; }; 15 | A993541E2079FD9300C69E0A /* markdown.h in Headers */ = {isa = PBXBuildFile; fileRef = A993541C2079FD9200C69E0A /* markdown.h */; }; 16 | A993541F2079FD9300C69E0A /* markdown.m in Sources */ = {isa = PBXBuildFile; fileRef = A993541D2079FD9300C69E0A /* markdown.m */; }; 17 | A9EEB58520791BAB00898B01 /* GenerateThumbnailForURL.m in Sources */ = {isa = PBXBuildFile; fileRef = A9EEB58420791BAB00898B01 /* GenerateThumbnailForURL.m */; }; 18 | A9EEB58720791BAB00898B01 /* GeneratePreviewForURL.m in Sources */ = {isa = PBXBuildFile; fileRef = A9EEB58620791BAB00898B01 /* GeneratePreviewForURL.m */; }; 19 | A9EEB58920791BAB00898B01 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = A9EEB58820791BAB00898B01 /* main.c */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXFileReference section */ 23 | 442ED45D569E2BE40D0580CC /* Pods-QLMarkdownGFM.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-QLMarkdownGFM.release.xcconfig"; path = "Pods/Target Support Files/Pods-QLMarkdownGFM/Pods-QLMarkdownGFM.release.xcconfig"; sourceTree = ""; }; 24 | 7D6418EA6C4F01551C7DC91F /* libPods-QLMarkdownGFM.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-QLMarkdownGFM.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 25 | A90BB4A0230865A8004BB0E1 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 26 | A9493948207A37ED0086053A /* styles.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = styles.css; sourceTree = ""; }; 27 | A9789C09213A86C70077C0D4 /* libcmark-gfm-extensions.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libcmark-gfm-extensions.a"; path = "cmark/lib/libcmark-gfm-extensions.a"; sourceTree = ""; }; 28 | A993541C2079FD9200C69E0A /* markdown.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = markdown.h; sourceTree = ""; }; 29 | A993541D2079FD9300C69E0A /* markdown.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = markdown.m; sourceTree = ""; }; 30 | A9EB9E9C207A51D800BAE9F7 /* libcmark-gfmextensions.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libcmark-gfmextensions.a"; path = "cmark/lib/libcmark-gfmextensions.a"; sourceTree = ""; }; 31 | A9EB9E9D207A51D800BAE9F7 /* libcmark-gfm.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libcmark-gfm.a"; path = "cmark/lib/libcmark-gfm.a"; sourceTree = ""; }; 32 | A9EEB58120791BAB00898B01 /* QLMarkdownGFM.qlgenerator */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = QLMarkdownGFM.qlgenerator; sourceTree = BUILT_PRODUCTS_DIR; }; 33 | A9EEB58420791BAB00898B01 /* GenerateThumbnailForURL.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GenerateThumbnailForURL.m; sourceTree = ""; }; 34 | A9EEB58620791BAB00898B01 /* GeneratePreviewForURL.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GeneratePreviewForURL.m; sourceTree = ""; }; 35 | A9EEB58820791BAB00898B01 /* main.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = ""; }; 36 | A9EEB58A20791BAB00898B01 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 37 | AE8F41773B8272957FBE9EE4 /* Pods-QLMarkdownGFM.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-QLMarkdownGFM.debug.xcconfig"; path = "Pods/Target Support Files/Pods-QLMarkdownGFM/Pods-QLMarkdownGFM.debug.xcconfig"; sourceTree = ""; }; 38 | /* End PBXFileReference section */ 39 | 40 | /* Begin PBXFrameworksBuildPhase section */ 41 | A9EEB57D20791BAB00898B01 /* Frameworks */ = { 42 | isa = PBXFrameworksBuildPhase; 43 | buildActionMask = 2147483647; 44 | files = ( 45 | A9789C0A213A86C70077C0D4 /* libcmark-gfm-extensions.a in Frameworks */, 46 | A90BB4A1230865A8004BB0E1 /* Cocoa.framework in Frameworks */, 47 | A9789C08213A86C70077C0D4 /* libcmark-gfm.a in Frameworks */, 48 | 9044FA23FF8A0EB6A982BAA2 /* libPods-QLMarkdownGFM.a in Frameworks */, 49 | ); 50 | runOnlyForDeploymentPostprocessing = 0; 51 | }; 52 | /* End PBXFrameworksBuildPhase section */ 53 | 54 | /* Begin PBXGroup section */ 55 | 687FAA189EA0E6623359BC91 /* Pods */ = { 56 | isa = PBXGroup; 57 | children = ( 58 | AE8F41773B8272957FBE9EE4 /* Pods-QLMarkdownGFM.debug.xcconfig */, 59 | 442ED45D569E2BE40D0580CC /* Pods-QLMarkdownGFM.release.xcconfig */, 60 | ); 61 | name = Pods; 62 | sourceTree = ""; 63 | }; 64 | A99354202079FE1900C69E0A /* Frameworks */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | A90BB4A0230865A8004BB0E1 /* Cocoa.framework */, 68 | A9789C09213A86C70077C0D4 /* libcmark-gfm-extensions.a */, 69 | A9EB9E9D207A51D800BAE9F7 /* libcmark-gfm.a */, 70 | A9EB9E9C207A51D800BAE9F7 /* libcmark-gfmextensions.a */, 71 | 7D6418EA6C4F01551C7DC91F /* libPods-QLMarkdownGFM.a */, 72 | ); 73 | name = Frameworks; 74 | sourceTree = ""; 75 | }; 76 | A9EEB57720791BAB00898B01 = { 77 | isa = PBXGroup; 78 | children = ( 79 | A9EEB58320791BAB00898B01 /* QLMarkdownGFM */, 80 | A9EEB58220791BAB00898B01 /* Products */, 81 | A99354202079FE1900C69E0A /* Frameworks */, 82 | 687FAA189EA0E6623359BC91 /* Pods */, 83 | ); 84 | sourceTree = ""; 85 | }; 86 | A9EEB58220791BAB00898B01 /* Products */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | A9EEB58120791BAB00898B01 /* QLMarkdownGFM.qlgenerator */, 90 | ); 91 | name = Products; 92 | sourceTree = ""; 93 | }; 94 | A9EEB58320791BAB00898B01 /* QLMarkdownGFM */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | A9EEB58420791BAB00898B01 /* GenerateThumbnailForURL.m */, 98 | A9EEB58620791BAB00898B01 /* GeneratePreviewForURL.m */, 99 | A993541C2079FD9200C69E0A /* markdown.h */, 100 | A993541D2079FD9300C69E0A /* markdown.m */, 101 | A9EEB58820791BAB00898B01 /* main.c */, 102 | A9EEB58A20791BAB00898B01 /* Info.plist */, 103 | A9493948207A37ED0086053A /* styles.css */, 104 | ); 105 | path = QLMarkdownGFM; 106 | sourceTree = ""; 107 | }; 108 | /* End PBXGroup section */ 109 | 110 | /* Begin PBXHeadersBuildPhase section */ 111 | A9EEB57E20791BAB00898B01 /* Headers */ = { 112 | isa = PBXHeadersBuildPhase; 113 | buildActionMask = 2147483647; 114 | files = ( 115 | A993541E2079FD9300C69E0A /* markdown.h in Headers */, 116 | ); 117 | runOnlyForDeploymentPostprocessing = 0; 118 | }; 119 | /* End PBXHeadersBuildPhase section */ 120 | 121 | /* Begin PBXNativeTarget section */ 122 | A9EEB58020791BAB00898B01 /* QLMarkdownGFM */ = { 123 | isa = PBXNativeTarget; 124 | buildConfigurationList = A9EEB58D20791BAB00898B01 /* Build configuration list for PBXNativeTarget "QLMarkdownGFM" */; 125 | buildPhases = ( 126 | BA52E02D81F40CE4F1BBDF2A /* [CP] Check Pods Manifest.lock */, 127 | A9EEB57C20791BAB00898B01 /* Sources */, 128 | A9EEB57D20791BAB00898B01 /* Frameworks */, 129 | A9EEB57E20791BAB00898B01 /* Headers */, 130 | A9EEB57F20791BAB00898B01 /* Resources */, 131 | ); 132 | buildRules = ( 133 | ); 134 | dependencies = ( 135 | ); 136 | name = QLMarkdownGFM; 137 | productName = QLMarkdownGFM; 138 | productReference = A9EEB58120791BAB00898B01 /* QLMarkdownGFM.qlgenerator */; 139 | productType = "com.apple.product-type.bundle"; 140 | }; 141 | /* End PBXNativeTarget section */ 142 | 143 | /* Begin PBXProject section */ 144 | A9EEB57820791BAB00898B01 /* Project object */ = { 145 | isa = PBXProject; 146 | attributes = { 147 | LastUpgradeCheck = 0930; 148 | ORGANIZATIONNAME = Watson; 149 | TargetAttributes = { 150 | A9EEB58020791BAB00898B01 = { 151 | CreatedOnToolsVersion = 9.3; 152 | }; 153 | }; 154 | }; 155 | buildConfigurationList = A9EEB57B20791BAB00898B01 /* Build configuration list for PBXProject "QLMarkdownGFM" */; 156 | compatibilityVersion = "Xcode 9.3"; 157 | developmentRegion = en; 158 | hasScannedForEncodings = 0; 159 | knownRegions = ( 160 | en, 161 | ); 162 | mainGroup = A9EEB57720791BAB00898B01; 163 | productRefGroup = A9EEB58220791BAB00898B01 /* Products */; 164 | projectDirPath = ""; 165 | projectRoot = ""; 166 | targets = ( 167 | A9EEB58020791BAB00898B01 /* QLMarkdownGFM */, 168 | ); 169 | }; 170 | /* End PBXProject section */ 171 | 172 | /* Begin PBXResourcesBuildPhase section */ 173 | A9EEB57F20791BAB00898B01 /* Resources */ = { 174 | isa = PBXResourcesBuildPhase; 175 | buildActionMask = 2147483647; 176 | files = ( 177 | A9493949207A37EE0086053A /* styles.css in Resources */, 178 | ); 179 | runOnlyForDeploymentPostprocessing = 0; 180 | }; 181 | /* End PBXResourcesBuildPhase section */ 182 | 183 | /* Begin PBXShellScriptBuildPhase section */ 184 | BA52E02D81F40CE4F1BBDF2A /* [CP] Check Pods Manifest.lock */ = { 185 | isa = PBXShellScriptBuildPhase; 186 | buildActionMask = 2147483647; 187 | files = ( 188 | ); 189 | inputFileListPaths = ( 190 | ); 191 | inputPaths = ( 192 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 193 | "${PODS_ROOT}/Manifest.lock", 194 | ); 195 | name = "[CP] Check Pods Manifest.lock"; 196 | outputFileListPaths = ( 197 | ); 198 | outputPaths = ( 199 | "$(DERIVED_FILE_DIR)/Pods-QLMarkdownGFM-checkManifestLockResult.txt", 200 | ); 201 | runOnlyForDeploymentPostprocessing = 0; 202 | shellPath = /bin/sh; 203 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 204 | showEnvVarsInLog = 0; 205 | }; 206 | /* End PBXShellScriptBuildPhase section */ 207 | 208 | /* Begin PBXSourcesBuildPhase section */ 209 | A9EEB57C20791BAB00898B01 /* Sources */ = { 210 | isa = PBXSourcesBuildPhase; 211 | buildActionMask = 2147483647; 212 | files = ( 213 | A993541F2079FD9300C69E0A /* markdown.m in Sources */, 214 | A9EEB58520791BAB00898B01 /* GenerateThumbnailForURL.m in Sources */, 215 | A9EEB58720791BAB00898B01 /* GeneratePreviewForURL.m in Sources */, 216 | A9EEB58920791BAB00898B01 /* main.c in Sources */, 217 | ); 218 | runOnlyForDeploymentPostprocessing = 0; 219 | }; 220 | /* End PBXSourcesBuildPhase section */ 221 | 222 | /* Begin XCBuildConfiguration section */ 223 | A9EEB58B20791BAB00898B01 /* Debug */ = { 224 | isa = XCBuildConfiguration; 225 | buildSettings = { 226 | ALWAYS_SEARCH_USER_PATHS = NO; 227 | CLANG_ANALYZER_NONNULL = YES; 228 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 229 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 230 | CLANG_CXX_LIBRARY = "libc++"; 231 | CLANG_ENABLE_MODULES = YES; 232 | CLANG_ENABLE_OBJC_ARC = YES; 233 | CLANG_ENABLE_OBJC_WEAK = YES; 234 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 235 | CLANG_WARN_BOOL_CONVERSION = YES; 236 | CLANG_WARN_COMMA = YES; 237 | CLANG_WARN_CONSTANT_CONVERSION = YES; 238 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 239 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 240 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 241 | CLANG_WARN_EMPTY_BODY = YES; 242 | CLANG_WARN_ENUM_CONVERSION = YES; 243 | CLANG_WARN_INFINITE_RECURSION = YES; 244 | CLANG_WARN_INT_CONVERSION = YES; 245 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 246 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 247 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 248 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 249 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 250 | CLANG_WARN_STRICT_PROTOTYPES = YES; 251 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 252 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 253 | CLANG_WARN_UNREACHABLE_CODE = YES; 254 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 255 | CODE_SIGN_IDENTITY = "-"; 256 | COPY_PHASE_STRIP = NO; 257 | DEBUG_INFORMATION_FORMAT = dwarf; 258 | ENABLE_STRICT_OBJC_MSGSEND = YES; 259 | ENABLE_TESTABILITY = YES; 260 | GCC_C_LANGUAGE_STANDARD = gnu11; 261 | GCC_DYNAMIC_NO_PIC = NO; 262 | GCC_NO_COMMON_BLOCKS = YES; 263 | GCC_OPTIMIZATION_LEVEL = 0; 264 | GCC_PREPROCESSOR_DEFINITIONS = ( 265 | "DEBUG=1", 266 | "$(inherited)", 267 | ); 268 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 269 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 270 | GCC_WARN_UNDECLARED_SELECTOR = YES; 271 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 272 | GCC_WARN_UNUSED_FUNCTION = YES; 273 | GCC_WARN_UNUSED_VARIABLE = YES; 274 | MACOSX_DEPLOYMENT_TARGET = 10.13; 275 | MTL_ENABLE_DEBUG_INFO = YES; 276 | ONLY_ACTIVE_ARCH = YES; 277 | SDKROOT = macosx; 278 | }; 279 | name = Debug; 280 | }; 281 | A9EEB58C20791BAB00898B01 /* Release */ = { 282 | isa = XCBuildConfiguration; 283 | buildSettings = { 284 | ALWAYS_SEARCH_USER_PATHS = NO; 285 | CLANG_ANALYZER_NONNULL = YES; 286 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 287 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 288 | CLANG_CXX_LIBRARY = "libc++"; 289 | CLANG_ENABLE_MODULES = YES; 290 | CLANG_ENABLE_OBJC_ARC = YES; 291 | CLANG_ENABLE_OBJC_WEAK = YES; 292 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 293 | CLANG_WARN_BOOL_CONVERSION = YES; 294 | CLANG_WARN_COMMA = YES; 295 | CLANG_WARN_CONSTANT_CONVERSION = YES; 296 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 297 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 298 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 299 | CLANG_WARN_EMPTY_BODY = YES; 300 | CLANG_WARN_ENUM_CONVERSION = YES; 301 | CLANG_WARN_INFINITE_RECURSION = YES; 302 | CLANG_WARN_INT_CONVERSION = YES; 303 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 304 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 305 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 306 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 307 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 308 | CLANG_WARN_STRICT_PROTOTYPES = YES; 309 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 310 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 311 | CLANG_WARN_UNREACHABLE_CODE = YES; 312 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 313 | CODE_SIGN_IDENTITY = "-"; 314 | COPY_PHASE_STRIP = NO; 315 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 316 | ENABLE_NS_ASSERTIONS = NO; 317 | ENABLE_STRICT_OBJC_MSGSEND = YES; 318 | GCC_C_LANGUAGE_STANDARD = gnu11; 319 | GCC_NO_COMMON_BLOCKS = YES; 320 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 321 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 322 | GCC_WARN_UNDECLARED_SELECTOR = YES; 323 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 324 | GCC_WARN_UNUSED_FUNCTION = YES; 325 | GCC_WARN_UNUSED_VARIABLE = YES; 326 | MACOSX_DEPLOYMENT_TARGET = 10.13; 327 | MTL_ENABLE_DEBUG_INFO = NO; 328 | SDKROOT = macosx; 329 | }; 330 | name = Release; 331 | }; 332 | A9EEB58E20791BAB00898B01 /* Debug */ = { 333 | isa = XCBuildConfiguration; 334 | baseConfigurationReference = AE8F41773B8272957FBE9EE4 /* Pods-QLMarkdownGFM.debug.xcconfig */; 335 | buildSettings = { 336 | CODE_SIGN_IDENTITY = "Developer ID Application"; 337 | CODE_SIGN_STYLE = Manual; 338 | COMBINE_HIDPI_IMAGES = YES; 339 | CURRENT_PROJECT_VERSION = 6; 340 | DEVELOPMENT_TEAM = 3E97Y6CS78; 341 | HEADER_SEARCH_PATHS = ( 342 | cmark/include, 343 | Pods/ZWEmoji/lib, 344 | ); 345 | INFOPLIST_FILE = QLMarkdownGFM/Info.plist; 346 | INSTALL_PATH = /Library/QuickLook; 347 | LIBRARY_SEARCH_PATHS = ( 348 | "$(inherited)", 349 | "$(PROJECT_DIR)/cmark/lib", 350 | ); 351 | MACOSX_DEPLOYMENT_TARGET = 10.13; 352 | MARKETING_VERSION = 1.3.3; 353 | PRODUCT_BUNDLE_IDENTIFIER = "jp.cat-soft.QLMarkdownGFM"; 354 | PRODUCT_NAME = "$(TARGET_NAME)"; 355 | PROVISIONING_PROFILE_SPECIFIER = ""; 356 | WRAPPER_EXTENSION = qlgenerator; 357 | }; 358 | name = Debug; 359 | }; 360 | A9EEB58F20791BAB00898B01 /* Release */ = { 361 | isa = XCBuildConfiguration; 362 | baseConfigurationReference = 442ED45D569E2BE40D0580CC /* Pods-QLMarkdownGFM.release.xcconfig */; 363 | buildSettings = { 364 | CODE_SIGN_IDENTITY = "Developer ID Application"; 365 | CODE_SIGN_STYLE = Manual; 366 | COMBINE_HIDPI_IMAGES = YES; 367 | CURRENT_PROJECT_VERSION = 6; 368 | DEVELOPMENT_TEAM = 3E97Y6CS78; 369 | HEADER_SEARCH_PATHS = ( 370 | cmark/include, 371 | Pods/ZWEmoji/lib, 372 | ); 373 | INFOPLIST_FILE = QLMarkdownGFM/Info.plist; 374 | INSTALL_PATH = /Library/QuickLook; 375 | LIBRARY_SEARCH_PATHS = ( 376 | "$(inherited)", 377 | "$(PROJECT_DIR)/cmark/lib", 378 | ); 379 | MACOSX_DEPLOYMENT_TARGET = 10.13; 380 | MARKETING_VERSION = 1.3.3; 381 | PRODUCT_BUNDLE_IDENTIFIER = "jp.cat-soft.QLMarkdownGFM"; 382 | PRODUCT_NAME = "$(TARGET_NAME)"; 383 | PROVISIONING_PROFILE_SPECIFIER = ""; 384 | WRAPPER_EXTENSION = qlgenerator; 385 | }; 386 | name = Release; 387 | }; 388 | /* End XCBuildConfiguration section */ 389 | 390 | /* Begin XCConfigurationList section */ 391 | A9EEB57B20791BAB00898B01 /* Build configuration list for PBXProject "QLMarkdownGFM" */ = { 392 | isa = XCConfigurationList; 393 | buildConfigurations = ( 394 | A9EEB58B20791BAB00898B01 /* Debug */, 395 | A9EEB58C20791BAB00898B01 /* Release */, 396 | ); 397 | defaultConfigurationIsVisible = 0; 398 | defaultConfigurationName = Release; 399 | }; 400 | A9EEB58D20791BAB00898B01 /* Build configuration list for PBXNativeTarget "QLMarkdownGFM" */ = { 401 | isa = XCConfigurationList; 402 | buildConfigurations = ( 403 | A9EEB58E20791BAB00898B01 /* Debug */, 404 | A9EEB58F20791BAB00898B01 /* Release */, 405 | ); 406 | defaultConfigurationIsVisible = 0; 407 | defaultConfigurationName = Release; 408 | }; 409 | /* End XCConfigurationList section */ 410 | }; 411 | rootObject = A9EEB57820791BAB00898B01 /* Project object */; 412 | } 413 | -------------------------------------------------------------------------------- /QLMarkdownGFM.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /QLMarkdownGFM.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /QLMarkdownGFM.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /QLMarkdownGFM.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /QLMarkdownGFM/GeneratePreviewForURL.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "markdown.h" 4 | 5 | OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options); 6 | void CancelPreviewGeneration(void *thisInterface, QLPreviewRequestRef preview); 7 | 8 | /* ----------------------------------------------------------------------------- 9 | Generate a preview for file 10 | 11 | This function's job is to create preview for designated file 12 | ----------------------------------------------------------------------------- */ 13 | 14 | OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options) 15 | { 16 | @autoreleasepool { 17 | NSData *data = renderHTML((__bridge NSURL*) url); 18 | NSDictionary* properties = @{ 19 | (__bridge NSString*)kQLPreviewPropertyTextEncodingNameKey : @"UTF-8", 20 | (__bridge NSString*)kQLPreviewPropertyMIMETypeKey : @"text/html", 21 | }; 22 | if (data) { 23 | QLPreviewRequestSetDataRepresentation(preview, (__bridge CFDataRef)data, kUTTypeHTML, (__bridge CFDictionaryRef)properties); 24 | } 25 | 26 | return noErr; 27 | } 28 | } 29 | 30 | void CancelPreviewGeneration(void *thisInterface, QLPreviewRequestRef preview) 31 | { 32 | // Implement only if supported 33 | } 34 | -------------------------------------------------------------------------------- /QLMarkdownGFM/GenerateThumbnailForURL.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "markdown.h" 4 | 5 | OSStatus GenerateThumbnailForURL(void *thisInterface, QLThumbnailRequestRef thumbnail, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options, CGSize maxSize); 6 | void CancelThumbnailGeneration(void *thisInterface, QLThumbnailRequestRef thumbnail); 7 | 8 | /* ----------------------------------------------------------------------------- 9 | Generate a thumbnail for file 10 | 11 | This function's job is to create thumbnail for designated file as fast as possible 12 | ----------------------------------------------------------------------------- */ 13 | 14 | OSStatus GenerateThumbnailForURL(void *thisInterface, QLThumbnailRequestRef thumbnail, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options, CGSize maxSize) 15 | { 16 | @autoreleasepool { 17 | NSData *data = renderHTML((__bridge NSURL*) url); 18 | if (data) { 19 | float scale = maxSize.height / 800.0; 20 | NSDictionary *properties = @{ (id)kQLThumbnailOptionScaleFactorKey: @(scale) }; 21 | QLThumbnailRequestSetThumbnailWithDataRepresentation(thumbnail, (__bridge CFDataRef)data, kUTTypeHTML, NULL, (__bridge CFDictionaryRef)properties); 22 | } 23 | } 24 | return noErr; 25 | } 26 | 27 | void CancelThumbnailGeneration(void *thisInterface, QLThumbnailRequestRef thumbnail) 28 | { 29 | // Implement only if supported 30 | } 31 | -------------------------------------------------------------------------------- /QLMarkdownGFM/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDocumentTypes 8 | 9 | 10 | CFBundleTypeRole 11 | QLGenerator 12 | LSItemContentTypes 13 | 14 | net.daringfireball.markdown 15 | 16 | 17 | 18 | CFBundleExecutable 19 | $(EXECUTABLE_NAME) 20 | CFBundleIdentifier 21 | $(PRODUCT_BUNDLE_IDENTIFIER) 22 | CFBundleInfoDictionaryVersion 23 | 6.0 24 | CFBundleName 25 | $(PRODUCT_NAME) 26 | CFBundleShortVersionString 27 | $(MARKETING_VERSION) 28 | CFBundleVersion 29 | $(CURRENT_PROJECT_VERSION) 30 | CFPlugInDynamicRegisterFunction 31 | 32 | CFPlugInDynamicRegistration 33 | NO 34 | CFPlugInFactories 35 | 36 | A9F5824E-B325-464E-BB27-E42928EC02A3 37 | QuickLookGeneratorPluginFactory 38 | 39 | CFPlugInTypes 40 | 41 | 5E2D9680-5022-40FA-B806-43349622E5B9 42 | 43 | A9F5824E-B325-464E-BB27-E42928EC02A3 44 | 45 | 46 | CFPlugInUnloadFunction 47 | 48 | NSHumanReadableCopyright 49 | Copyright © 2018年 Watson. All rights reserved. 50 | QLNeedsToBeRunInMainThread 51 | 52 | QLPreviewHeight 53 | 768 54 | QLPreviewWidth 55 | 1024 56 | QLSupportsConcurrentRequests 57 | 58 | QLThumbnailMinimumSize 59 | 17 60 | UTImportedTypeDeclarations 61 | 62 | 63 | 64 | UTTypeConformsTo 65 | 66 | public.plain-text 67 | 68 | UTTypeDescription 69 | Markdown document 70 | UTTypeIconFile 71 | public.text.icns 72 | UTTypeIdentifier 73 | net.daringfireball.markdown 74 | UTTypeReferenceURL 75 | http://daringfireball.net/projects/markdown/ 76 | UTTypeTagSpecification 77 | 78 | public.filename-extension 79 | 80 | multimarkdown 81 | markdown 82 | mdown 83 | md 84 | mdml 85 | text 86 | mdwn 87 | mkd 88 | mmd 89 | ft 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /QLMarkdownGFM/main.c: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // 3 | // DO NO MODIFY THE CONTENT OF THIS FILE 4 | // 5 | // This file contains the generic CFPlug-in code necessary for your generator 6 | // To complete your generator implement the function in GenerateThumbnailForURL/GeneratePreviewForURL.c 7 | // 8 | //============================================================================== 9 | 10 | 11 | 12 | 13 | 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | // ----------------------------------------------------------------------------- 21 | // constants 22 | // ----------------------------------------------------------------------------- 23 | 24 | // Don't modify this line 25 | #define PLUGIN_ID "1D2341B3-6CB7-4398-BDCC-5084E47C8392" 26 | 27 | // 28 | // Below is the generic glue code for all plug-ins. 29 | // 30 | // You should not have to modify this code aside from changing 31 | // names if you decide to change the names defined in the Info.plist 32 | // 33 | 34 | 35 | // ----------------------------------------------------------------------------- 36 | // typedefs 37 | // ----------------------------------------------------------------------------- 38 | 39 | // The thumbnail generation function to be implemented in GenerateThumbnailForURL.c 40 | OSStatus GenerateThumbnailForURL(void *thisInterface, QLThumbnailRequestRef thumbnail, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options, CGSize maxSize); 41 | void CancelThumbnailGeneration(void* thisInterface, QLThumbnailRequestRef thumbnail); 42 | 43 | // The preview generation function to be implemented in GeneratePreviewForURL.c 44 | OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options); 45 | void CancelPreviewGeneration(void *thisInterface, QLPreviewRequestRef preview); 46 | 47 | // The layout for an instance of QuickLookGeneratorPlugIn 48 | typedef struct __QuickLookGeneratorPluginType 49 | { 50 | void *conduitInterface; 51 | CFUUIDRef factoryID; 52 | UInt32 refCount; 53 | } QuickLookGeneratorPluginType; 54 | 55 | // ----------------------------------------------------------------------------- 56 | // prototypes 57 | // ----------------------------------------------------------------------------- 58 | // Forward declaration for the IUnknown implementation. 59 | // 60 | 61 | QuickLookGeneratorPluginType *AllocQuickLookGeneratorPluginType(CFUUIDRef inFactoryID); 62 | void DeallocQuickLookGeneratorPluginType(QuickLookGeneratorPluginType *thisInstance); 63 | HRESULT QuickLookGeneratorQueryInterface(void *thisInstance,REFIID iid,LPVOID *ppv); 64 | void *QuickLookGeneratorPluginFactory(CFAllocatorRef allocator,CFUUIDRef typeID); 65 | ULONG QuickLookGeneratorPluginAddRef(void *thisInstance); 66 | ULONG QuickLookGeneratorPluginRelease(void *thisInstance); 67 | 68 | // ----------------------------------------------------------------------------- 69 | // myInterfaceFtbl definition 70 | // ----------------------------------------------------------------------------- 71 | // The QLGeneratorInterfaceStruct function table. 72 | // 73 | static QLGeneratorInterfaceStruct myInterfaceFtbl = { 74 | NULL, 75 | QuickLookGeneratorQueryInterface, 76 | QuickLookGeneratorPluginAddRef, 77 | QuickLookGeneratorPluginRelease, 78 | NULL, 79 | NULL, 80 | NULL, 81 | NULL 82 | }; 83 | 84 | 85 | // ----------------------------------------------------------------------------- 86 | // AllocQuickLookGeneratorPluginType 87 | // ----------------------------------------------------------------------------- 88 | // Utility function that allocates a new instance. 89 | // You can do some initial setup for the generator here if you wish 90 | // like allocating globals etc... 91 | // 92 | QuickLookGeneratorPluginType *AllocQuickLookGeneratorPluginType(CFUUIDRef inFactoryID) 93 | { 94 | QuickLookGeneratorPluginType *theNewInstance; 95 | 96 | theNewInstance = (QuickLookGeneratorPluginType *)malloc(sizeof(QuickLookGeneratorPluginType)); 97 | memset(theNewInstance,0,sizeof(QuickLookGeneratorPluginType)); 98 | 99 | /* Point to the function table Malloc enough to store the stuff and copy the filler from myInterfaceFtbl over */ 100 | theNewInstance->conduitInterface = malloc(sizeof(QLGeneratorInterfaceStruct)); 101 | memcpy(theNewInstance->conduitInterface,&myInterfaceFtbl,sizeof(QLGeneratorInterfaceStruct)); 102 | 103 | /* Retain and keep an open instance refcount for each factory. */ 104 | theNewInstance->factoryID = CFRetain(inFactoryID); 105 | CFPlugInAddInstanceForFactory(inFactoryID); 106 | 107 | /* This function returns the IUnknown interface so set the refCount to one. */ 108 | theNewInstance->refCount = 1; 109 | return theNewInstance; 110 | } 111 | 112 | // ----------------------------------------------------------------------------- 113 | // DeallocQuickLookGeneratorPluginType 114 | // ----------------------------------------------------------------------------- 115 | // Utility function that deallocates the instance when 116 | // the refCount goes to zero. 117 | // In the current implementation generator interfaces are never deallocated 118 | // but implement this as this might change in the future 119 | // 120 | void DeallocQuickLookGeneratorPluginType(QuickLookGeneratorPluginType *thisInstance) 121 | { 122 | CFUUIDRef theFactoryID; 123 | 124 | theFactoryID = thisInstance->factoryID; 125 | /* Free the conduitInterface table up */ 126 | free(thisInstance->conduitInterface); 127 | 128 | /* Free the instance structure */ 129 | free(thisInstance); 130 | if (theFactoryID){ 131 | CFPlugInRemoveInstanceForFactory(theFactoryID); 132 | CFRelease(theFactoryID); 133 | } 134 | } 135 | 136 | // ----------------------------------------------------------------------------- 137 | // QuickLookGeneratorQueryInterface 138 | // ----------------------------------------------------------------------------- 139 | // Implementation of the IUnknown QueryInterface function. 140 | // 141 | HRESULT QuickLookGeneratorQueryInterface(void *thisInstance,REFIID iid,LPVOID *ppv) 142 | { 143 | CFUUIDRef interfaceID; 144 | 145 | interfaceID = CFUUIDCreateFromUUIDBytes(kCFAllocatorDefault,iid); 146 | 147 | if (CFEqual(interfaceID,kQLGeneratorCallbacksInterfaceID)){ 148 | /* If the Right interface was requested, bump the ref count, 149 | * set the ppv parameter equal to the instance, and 150 | * return good status. 151 | */ 152 | ((QLGeneratorInterfaceStruct *)((QuickLookGeneratorPluginType *)thisInstance)->conduitInterface)->GenerateThumbnailForURL = GenerateThumbnailForURL; 153 | ((QLGeneratorInterfaceStruct *)((QuickLookGeneratorPluginType *)thisInstance)->conduitInterface)->CancelThumbnailGeneration = CancelThumbnailGeneration; 154 | ((QLGeneratorInterfaceStruct *)((QuickLookGeneratorPluginType *)thisInstance)->conduitInterface)->GeneratePreviewForURL = GeneratePreviewForURL; 155 | ((QLGeneratorInterfaceStruct *)((QuickLookGeneratorPluginType *)thisInstance)->conduitInterface)->CancelPreviewGeneration = CancelPreviewGeneration; 156 | ((QLGeneratorInterfaceStruct *)((QuickLookGeneratorPluginType*)thisInstance)->conduitInterface)->AddRef(thisInstance); 157 | *ppv = thisInstance; 158 | CFRelease(interfaceID); 159 | return S_OK; 160 | }else{ 161 | /* Requested interface unknown, bail with error. */ 162 | *ppv = NULL; 163 | CFRelease(interfaceID); 164 | return E_NOINTERFACE; 165 | } 166 | } 167 | 168 | // ----------------------------------------------------------------------------- 169 | // QuickLookGeneratorPluginAddRef 170 | // ----------------------------------------------------------------------------- 171 | // Implementation of reference counting for this type. Whenever an interface 172 | // is requested, bump the refCount for the instance. NOTE: returning the 173 | // refcount is a convention but is not required so don't rely on it. 174 | // 175 | ULONG QuickLookGeneratorPluginAddRef(void *thisInstance) 176 | { 177 | ((QuickLookGeneratorPluginType *)thisInstance )->refCount += 1; 178 | return ((QuickLookGeneratorPluginType*) thisInstance)->refCount; 179 | } 180 | 181 | // ----------------------------------------------------------------------------- 182 | // QuickLookGeneratorPluginRelease 183 | // ----------------------------------------------------------------------------- 184 | // When an interface is released, decrement the refCount. 185 | // If the refCount goes to zero, deallocate the instance. 186 | // 187 | ULONG QuickLookGeneratorPluginRelease(void *thisInstance) 188 | { 189 | ((QuickLookGeneratorPluginType*)thisInstance)->refCount -= 1; 190 | if (((QuickLookGeneratorPluginType*)thisInstance)->refCount == 0){ 191 | DeallocQuickLookGeneratorPluginType((QuickLookGeneratorPluginType*)thisInstance ); 192 | return 0; 193 | }else{ 194 | return ((QuickLookGeneratorPluginType*) thisInstance )->refCount; 195 | } 196 | } 197 | 198 | // ----------------------------------------------------------------------------- 199 | // QuickLookGeneratorPluginFactory 200 | // ----------------------------------------------------------------------------- 201 | void *QuickLookGeneratorPluginFactory(CFAllocatorRef allocator,CFUUIDRef typeID) 202 | { 203 | QuickLookGeneratorPluginType *result; 204 | CFUUIDRef uuid; 205 | 206 | /* If correct type is being requested, allocate an 207 | * instance of kQLGeneratorTypeID and return the IUnknown interface. 208 | */ 209 | if (CFEqual(typeID,kQLGeneratorTypeID)){ 210 | uuid = CFUUIDCreateFromString(kCFAllocatorDefault,CFSTR(PLUGIN_ID)); 211 | result = AllocQuickLookGeneratorPluginType(uuid); 212 | CFRelease(uuid); 213 | return result; 214 | } 215 | /* If the requested type is incorrect, return NULL. */ 216 | return NULL; 217 | } 218 | 219 | -------------------------------------------------------------------------------- /QLMarkdownGFM/markdown.h: -------------------------------------------------------------------------------- 1 | #ifndef markdown_h 2 | #define markdown_h 3 | 4 | NSData *renderHTML(NSURL *url); 5 | 6 | #endif /* markdown_h */ 7 | -------------------------------------------------------------------------------- /QLMarkdownGFM/markdown.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "cmark-gfm.h" 3 | #import "cmark-gfm-core-extensions.h" 4 | #import "ZWEmoji.h" 5 | 6 | const char *extensions[] = { "table", "strikethrough", "autolink", "tagfilter", "tasklist" }; 7 | 8 | NSData *renderHTML(NSURL *url) 9 | { 10 | NSString *content = [NSString stringWithContentsOfURL:url encoding:NSUTF8StringEncoding error:nil]; 11 | if (!content) { 12 | return nil; 13 | } 14 | NSString *replacedContent = [ZWEmoji emojify:content]; 15 | NSData *data = [replacedContent dataUsingEncoding:NSUTF8StringEncoding]; 16 | 17 | int options = CMARK_OPT_DEFAULT | CMARK_OPT_GITHUB_PRE_LANG; 18 | cmark_gfm_core_extensions_ensure_registered(); 19 | 20 | cmark_mem *mem = cmark_get_default_mem_allocator(); 21 | cmark_parser *parser = cmark_parser_new_with_mem(options, mem); 22 | 23 | int extensions_count = sizeof(extensions) / sizeof(char*); 24 | for (int i = 0; i < extensions_count; i++) { 25 | cmark_syntax_extension *syntax_extension = cmark_find_syntax_extension(extensions[i]); 26 | if (syntax_extension) { 27 | cmark_parser_attach_syntax_extension(parser, syntax_extension); 28 | } 29 | } 30 | 31 | cmark_parser_feed(parser, data.bytes, data.length); 32 | cmark_node *document = cmark_parser_finish(parser); 33 | char *output = cmark_render_html_with_mem(document, options, cmark_parser_get_syntax_extensions(parser), mem); 34 | 35 | NSString *path = [[NSBundle bundleWithIdentifier: @"jp.cat-soft.QLMarkdownGFM"] pathForResource:@"styles" ofType:@"css"]; 36 | NSString *styles = [[NSString alloc] initWithContentsOfFile: path 37 | encoding: NSUTF8StringEncoding 38 | error: nil]; 39 | 40 | NSString *html = [NSString stringWithFormat:@"\n" 41 | "\n" 42 | "\n" 43 | "\n" 44 | "" 45 | "\n" 46 | "\n" 47 | "\n" 48 | "%@" 49 | "\n" 50 | "", 51 | styles, url, [NSString stringWithUTF8String:output]]; 52 | html = [html stringByReplacingOccurrencesOfString:@"
  • [!IMPORTANT] 8 | > This plugin does not work since macOS 15, because it deprecates Quick Look Generator plugins. 9 | > https://developer.apple.com/documentation/macos-release-notes/macos-15-release-notes#Quick-Look 10 | 11 | Here is QLMarkdownGFM screenshots. 12 | 13 | Thumbnail | Preview 14 | -- | -- 15 | | 16 | 17 | ## Installation 18 | 19 | If you have been used other QuickLook plugin, please remove it before (See https://github.com/Watson1978/QLMarkdownGFM/issues/3). 20 | 21 | ### By homebrew-cask 22 | 23 | If you use [homebrew-cask](https://github.com/Homebrew/homebrew-cask), you can install this by following command. 24 | 25 | ``` 26 | $ brew tap Watson1978/formula 27 | $ brew install --cask watson1978/formula/qlmarkdowngfm 28 | ``` 29 | 30 | To uninstall, 31 | 32 | ``` 33 | $ brew uninstall --cask watson1978/formula/qlmarkdowngfm 34 | $ brew untap Watson1978/formula 35 | ``` 36 | 37 | ### By manual 38 | 39 | Simply copy QLMarkdownGFM.qlgenerator to `~/Library/QuickLook` or `/Library/QuickLook`. 40 | 41 | If the newly installed plugin is not picked up instantly, you can run `qlmanage -r` in Terminal to refresh. 42 | 43 | To uninstall, drag QLMarkdownGFM into the trash. 44 | -------------------------------------------------------------------------------- /cmark/include/cmark-gfm-core-extensions.h: -------------------------------------------------------------------------------- 1 | #ifndef CMARK_GFM_CORE_EXTENSIONS_H 2 | #define CMARK_GFM_CORE_EXTENSIONS_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include "cmark-gfm-extension_api.h" 9 | #include "cmark-gfm_export.h" 10 | #include 11 | #include 12 | 13 | CMARK_GFM_EXPORT 14 | void cmark_gfm_core_extensions_ensure_registered(void); 15 | 16 | CMARK_GFM_EXPORT 17 | uint16_t cmark_gfm_extensions_get_table_columns(cmark_node *node); 18 | 19 | /** Sets the number of columns for the table, returning 1 on success and 0 on error. 20 | */ 21 | CMARK_GFM_EXPORT 22 | int cmark_gfm_extensions_set_table_columns(cmark_node *node, uint16_t n_columns); 23 | 24 | CMARK_GFM_EXPORT 25 | uint8_t *cmark_gfm_extensions_get_table_alignments(cmark_node *node); 26 | 27 | /** Sets the alignments for the table, returning 1 on success and 0 on error. 28 | */ 29 | CMARK_GFM_EXPORT 30 | int cmark_gfm_extensions_set_table_alignments(cmark_node *node, uint16_t ncols, uint8_t *alignments); 31 | 32 | CMARK_GFM_EXPORT 33 | int cmark_gfm_extensions_get_table_row_is_header(cmark_node *node); 34 | 35 | /** Sets whether the node is a table header row, returning 1 on success and 0 on error. 36 | */ 37 | CMARK_GFM_EXPORT 38 | int cmark_gfm_extensions_set_table_row_is_header(cmark_node *node, int is_header); 39 | 40 | CMARK_GFM_EXPORT 41 | bool cmark_gfm_extensions_get_tasklist_item_checked(cmark_node *node); 42 | /* For backwards compatibility */ 43 | #define cmark_gfm_extensions_tasklist_is_checked cmark_gfm_extensions_get_tasklist_item_checked 44 | 45 | /** Sets whether a tasklist item is "checked" (completed), returning 1 on success and 0 on error. 46 | */ 47 | CMARK_GFM_EXPORT 48 | int cmark_gfm_extensions_set_tasklist_item_checked(cmark_node *node, bool is_checked); 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /cmark/include/cmark-gfm-extension_api.h: -------------------------------------------------------------------------------- 1 | #ifndef CMARK_GFM_EXTENSION_API_H 2 | #define CMARK_GFM_EXTENSION_API_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include "cmark-gfm.h" 9 | 10 | struct cmark_renderer; 11 | struct cmark_html_renderer; 12 | struct cmark_chunk; 13 | 14 | /** 15 | * ## Extension Support 16 | * 17 | * While the "core" of libcmark is strictly compliant with the 18 | * specification, an API is provided for extension writers to 19 | * hook into the parsing process. 20 | * 21 | * It should be noted that the cmark_node API already offers 22 | * room for customization, with methods offered to traverse and 23 | * modify the AST, and even define custom blocks. 24 | * When the desired customization is achievable in an error-proof 25 | * way using that API, it should be the preferred method. 26 | * 27 | * The following API requires a more in-depth understanding 28 | * of libcmark's parsing strategy, which is exposed 29 | * [here](http://spec.commonmark.org/0.24/#appendix-a-parsing-strategy). 30 | * 31 | * It should be used when "a posteriori" modification of the AST 32 | * proves to be too difficult / impossible to implement correctly. 33 | * 34 | * It can also serve as an intermediary step before extending 35 | * the specification, as an extension implemented using this API 36 | * will be trivially integrated in the core if it proves to be 37 | * desirable. 38 | */ 39 | 40 | typedef struct cmark_plugin cmark_plugin; 41 | 42 | /** A syntax extension that can be attached to a cmark_parser 43 | * with cmark_parser_attach_syntax_extension(). 44 | * 45 | * Extension writers should assign functions matching 46 | * the signature of the following 'virtual methods' to 47 | * implement new functionality. 48 | * 49 | * Their calling order and expected behaviour match the procedure outlined 50 | * at : 51 | * 52 | * During step 1, cmark will call the function provided through 53 | * 'cmark_syntax_extension_set_match_block_func' when it 54 | * iterates over an open block created by this extension, 55 | * to determine whether it could contain the new line. 56 | * If no function was provided, cmark will close the block. 57 | * 58 | * During step 2, if and only if the new line doesn't match any 59 | * of the standard syntax rules, cmark will call the function 60 | * provided through 'cmark_syntax_extension_set_open_block_func' 61 | * to let the extension determine whether that new line matches 62 | * one of its syntax rules. 63 | * It is the responsibility of the parser to create and add the 64 | * new block with cmark_parser_make_block and cmark_parser_add_child. 65 | * If no function was provided is NULL, the extension will have 66 | * no effect at all on the final block structure of the AST. 67 | * 68 | * #### Inline parsing phase hooks 69 | * 70 | * For each character provided by the extension through 71 | * 'cmark_syntax_extension_set_special_inline_chars', 72 | * the function provided by the extension through 73 | * 'cmark_syntax_extension_set_match_inline_func' 74 | * will get called, it is the responsibility of the extension 75 | * to scan the characters located at the current inline parsing offset 76 | * with the cmark_inline_parser API. 77 | * 78 | * Depending on the type of the extension, it can either: 79 | * 80 | * * Scan forward, determine that the syntax matches and return 81 | * a newly-created inline node with the appropriate type. 82 | * This is the technique that would be used if inline code 83 | * (with backticks) was implemented as an extension. 84 | * * Scan only the character(s) that its syntax rules require 85 | * for opening and closing nodes, push a delimiter on the 86 | * delimiter stack, and return a simple text node with its 87 | * contents set to the character(s) consumed. 88 | * This is the technique that would be used if emphasis 89 | * inlines were implemented as an extension. 90 | * 91 | * When an extension has pushed delimiters on the stack, 92 | * the function provided through 93 | * 'cmark_syntax_extension_set_inline_from_delim_func' 94 | * will get called in a latter phase, 95 | * when the inline parser has matched opener and closer delimiters 96 | * created by the extension together. 97 | * 98 | * It is then the responsibility of the extension to modify 99 | * and populate the opener inline text node, and to remove 100 | * the necessary delimiters from the delimiter stack. 101 | * 102 | * Finally, the extension should return NULL if its scan didn't 103 | * match its syntax rules. 104 | * 105 | * The extension can store whatever private data it might need 106 | * with 'cmark_syntax_extension_set_private', 107 | * and optionally define a free function for this data. 108 | */ 109 | typedef struct subject cmark_inline_parser; 110 | 111 | /** Exposed raw for now */ 112 | 113 | typedef struct delimiter { 114 | struct delimiter *previous; 115 | struct delimiter *next; 116 | cmark_node *inl_text; 117 | bufsize_t position; 118 | bufsize_t length; 119 | unsigned char delim_char; 120 | int can_open; 121 | int can_close; 122 | } delimiter; 123 | 124 | /** 125 | * ### Plugin API. 126 | * 127 | * Extensions should be distributed as dynamic libraries, 128 | * with a single exported function named after the distributed 129 | * filename. 130 | * 131 | * When discovering extensions (see cmark_init), cmark will 132 | * try to load a symbol named "init_{{filename}}" in all the 133 | * dynamic libraries it encounters. 134 | * 135 | * For example, given a dynamic library named myextension.so 136 | * (or myextension.dll), cmark will try to load the symbol 137 | * named "init_myextension". This means that the filename 138 | * must lend itself to forming a valid C identifier, with 139 | * the notable exception of dashes, which will be translated 140 | * to underscores, which means cmark will look for a function 141 | * named "init_my_extension" if it encounters a dynamic library 142 | * named "my-extension.so". 143 | * 144 | * See the 'cmark_plugin_init_func' typedef for the exact prototype 145 | * this function should follow. 146 | * 147 | * For now the extensibility of cmark is not complete, as 148 | * it only offers API to hook into the block parsing phase 149 | * (). 150 | * 151 | * See 'cmark_plugin_register_syntax_extension' for more information. 152 | */ 153 | 154 | /** The prototype plugins' init function should follow. 155 | */ 156 | typedef int (*cmark_plugin_init_func)(cmark_plugin *plugin); 157 | 158 | /** Register a syntax 'extension' with the 'plugin', it will be made 159 | * available as an extension and, if attached to a cmark_parser 160 | * with 'cmark_parser_attach_syntax_extension', it will contribute 161 | * to the block parsing process. 162 | * 163 | * See the documentation for 'cmark_syntax_extension' for information 164 | * on how to implement one. 165 | * 166 | * This function will typically be called from the init function 167 | * of external modules. 168 | * 169 | * This takes ownership of 'extension', one should not call 170 | * 'cmark_syntax_extension_free' on a registered extension. 171 | */ 172 | CMARK_GFM_EXPORT 173 | int cmark_plugin_register_syntax_extension(cmark_plugin *plugin, 174 | cmark_syntax_extension *extension); 175 | 176 | /** This will search for the syntax extension named 'name' among the 177 | * registered syntax extensions. 178 | * 179 | * It can then be attached to a cmark_parser 180 | * with the cmark_parser_attach_syntax_extension method. 181 | */ 182 | CMARK_GFM_EXPORT 183 | cmark_syntax_extension *cmark_find_syntax_extension(const char *name); 184 | 185 | /** Should create and add a new open block to 'parent_container' if 186 | * 'input' matches a syntax rule for that block type. It is allowed 187 | * to modify the type of 'parent_container'. 188 | * 189 | * Should return the newly created block if there is one, or 190 | * 'parent_container' if its type was modified, or NULL. 191 | */ 192 | typedef cmark_node * (*cmark_open_block_func) (cmark_syntax_extension *extension, 193 | int indented, 194 | cmark_parser *parser, 195 | cmark_node *parent_container, 196 | unsigned char *input, 197 | int len); 198 | 199 | typedef cmark_node *(*cmark_match_inline_func)(cmark_syntax_extension *extension, 200 | cmark_parser *parser, 201 | cmark_node *parent, 202 | unsigned char character, 203 | cmark_inline_parser *inline_parser); 204 | 205 | typedef delimiter *(*cmark_inline_from_delim_func)(cmark_syntax_extension *extension, 206 | cmark_parser *parser, 207 | cmark_inline_parser *inline_parser, 208 | delimiter *opener, 209 | delimiter *closer); 210 | 211 | /** Should return 'true' if 'input' can be contained in 'container', 212 | * 'false' otherwise. 213 | */ 214 | typedef int (*cmark_match_block_func) (cmark_syntax_extension *extension, 215 | cmark_parser *parser, 216 | unsigned char *input, 217 | int len, 218 | cmark_node *container); 219 | 220 | typedef const char *(*cmark_get_type_string_func) (cmark_syntax_extension *extension, 221 | cmark_node *node); 222 | 223 | typedef int (*cmark_can_contain_func) (cmark_syntax_extension *extension, 224 | cmark_node *node, 225 | cmark_node_type child); 226 | 227 | typedef int (*cmark_contains_inlines_func) (cmark_syntax_extension *extension, 228 | cmark_node *node); 229 | 230 | typedef void (*cmark_common_render_func) (cmark_syntax_extension *extension, 231 | struct cmark_renderer *renderer, 232 | cmark_node *node, 233 | cmark_event_type ev_type, 234 | int options); 235 | 236 | typedef int (*cmark_commonmark_escape_func) (cmark_syntax_extension *extension, 237 | cmark_node *node, 238 | int c); 239 | 240 | typedef const char* (*cmark_xml_attr_func) (cmark_syntax_extension *extension, 241 | cmark_node *node); 242 | 243 | typedef void (*cmark_html_render_func) (cmark_syntax_extension *extension, 244 | struct cmark_html_renderer *renderer, 245 | cmark_node *node, 246 | cmark_event_type ev_type, 247 | int options); 248 | 249 | typedef int (*cmark_html_filter_func) (cmark_syntax_extension *extension, 250 | const unsigned char *tag, 251 | size_t tag_len); 252 | 253 | typedef cmark_node *(*cmark_postprocess_func) (cmark_syntax_extension *extension, 254 | cmark_parser *parser, 255 | cmark_node *root); 256 | 257 | typedef int (*cmark_ispunct_func) (char c); 258 | 259 | typedef void (*cmark_opaque_alloc_func) (cmark_syntax_extension *extension, 260 | cmark_mem *mem, 261 | cmark_node *node); 262 | 263 | typedef void (*cmark_opaque_free_func) (cmark_syntax_extension *extension, 264 | cmark_mem *mem, 265 | cmark_node *node); 266 | 267 | /** Free a cmark_syntax_extension. 268 | */ 269 | CMARK_GFM_EXPORT 270 | void cmark_syntax_extension_free (cmark_mem *mem, cmark_syntax_extension *extension); 271 | 272 | /** Return a newly-constructed cmark_syntax_extension, named 'name'. 273 | */ 274 | CMARK_GFM_EXPORT 275 | cmark_syntax_extension *cmark_syntax_extension_new (const char *name); 276 | 277 | CMARK_GFM_EXPORT 278 | cmark_node_type cmark_syntax_extension_add_node(int is_inline); 279 | 280 | CMARK_GFM_EXPORT 281 | void cmark_syntax_extension_set_emphasis(cmark_syntax_extension *extension, int emphasis); 282 | 283 | /** See the documentation for 'cmark_syntax_extension' 284 | */ 285 | CMARK_GFM_EXPORT 286 | void cmark_syntax_extension_set_open_block_func(cmark_syntax_extension *extension, 287 | cmark_open_block_func func); 288 | 289 | /** See the documentation for 'cmark_syntax_extension' 290 | */ 291 | CMARK_GFM_EXPORT 292 | void cmark_syntax_extension_set_match_block_func(cmark_syntax_extension *extension, 293 | cmark_match_block_func func); 294 | 295 | /** See the documentation for 'cmark_syntax_extension' 296 | */ 297 | CMARK_GFM_EXPORT 298 | void cmark_syntax_extension_set_match_inline_func(cmark_syntax_extension *extension, 299 | cmark_match_inline_func func); 300 | 301 | /** See the documentation for 'cmark_syntax_extension' 302 | */ 303 | CMARK_GFM_EXPORT 304 | void cmark_syntax_extension_set_inline_from_delim_func(cmark_syntax_extension *extension, 305 | cmark_inline_from_delim_func func); 306 | 307 | /** See the documentation for 'cmark_syntax_extension' 308 | */ 309 | CMARK_GFM_EXPORT 310 | void cmark_syntax_extension_set_special_inline_chars(cmark_syntax_extension *extension, 311 | cmark_llist *special_chars); 312 | 313 | /** See the documentation for 'cmark_syntax_extension' 314 | */ 315 | CMARK_GFM_EXPORT 316 | void cmark_syntax_extension_set_get_type_string_func(cmark_syntax_extension *extension, 317 | cmark_get_type_string_func func); 318 | 319 | /** See the documentation for 'cmark_syntax_extension' 320 | */ 321 | CMARK_GFM_EXPORT 322 | void cmark_syntax_extension_set_can_contain_func(cmark_syntax_extension *extension, 323 | cmark_can_contain_func func); 324 | 325 | /** See the documentation for 'cmark_syntax_extension' 326 | */ 327 | CMARK_GFM_EXPORT 328 | void cmark_syntax_extension_set_contains_inlines_func(cmark_syntax_extension *extension, 329 | cmark_contains_inlines_func func); 330 | 331 | /** See the documentation for 'cmark_syntax_extension' 332 | */ 333 | CMARK_GFM_EXPORT 334 | void cmark_syntax_extension_set_commonmark_render_func(cmark_syntax_extension *extension, 335 | cmark_common_render_func func); 336 | 337 | /** See the documentation for 'cmark_syntax_extension' 338 | */ 339 | CMARK_GFM_EXPORT 340 | void cmark_syntax_extension_set_plaintext_render_func(cmark_syntax_extension *extension, 341 | cmark_common_render_func func); 342 | 343 | /** See the documentation for 'cmark_syntax_extension' 344 | */ 345 | CMARK_GFM_EXPORT 346 | void cmark_syntax_extension_set_latex_render_func(cmark_syntax_extension *extension, 347 | cmark_common_render_func func); 348 | 349 | /** See the documentation for 'cmark_syntax_extension' 350 | */ 351 | CMARK_GFM_EXPORT 352 | void cmark_syntax_extension_set_xml_attr_func(cmark_syntax_extension *extension, 353 | cmark_xml_attr_func func); 354 | 355 | /** See the documentation for 'cmark_syntax_extension' 356 | */ 357 | CMARK_GFM_EXPORT 358 | void cmark_syntax_extension_set_man_render_func(cmark_syntax_extension *extension, 359 | cmark_common_render_func func); 360 | 361 | /** See the documentation for 'cmark_syntax_extension' 362 | */ 363 | CMARK_GFM_EXPORT 364 | void cmark_syntax_extension_set_html_render_func(cmark_syntax_extension *extension, 365 | cmark_html_render_func func); 366 | 367 | /** See the documentation for 'cmark_syntax_extension' 368 | */ 369 | CMARK_GFM_EXPORT 370 | void cmark_syntax_extension_set_html_filter_func(cmark_syntax_extension *extension, 371 | cmark_html_filter_func func); 372 | 373 | /** See the documentation for 'cmark_syntax_extension' 374 | */ 375 | CMARK_GFM_EXPORT 376 | void cmark_syntax_extension_set_commonmark_escape_func(cmark_syntax_extension *extension, 377 | cmark_commonmark_escape_func func); 378 | 379 | /** See the documentation for 'cmark_syntax_extension' 380 | */ 381 | CMARK_GFM_EXPORT 382 | void cmark_syntax_extension_set_private(cmark_syntax_extension *extension, 383 | void *priv, 384 | cmark_free_func free_func); 385 | 386 | /** See the documentation for 'cmark_syntax_extension' 387 | */ 388 | CMARK_GFM_EXPORT 389 | void *cmark_syntax_extension_get_private(cmark_syntax_extension *extension); 390 | 391 | /** See the documentation for 'cmark_syntax_extension' 392 | */ 393 | CMARK_GFM_EXPORT 394 | void cmark_syntax_extension_set_postprocess_func(cmark_syntax_extension *extension, 395 | cmark_postprocess_func func); 396 | 397 | /** See the documentation for 'cmark_syntax_extension' 398 | */ 399 | CMARK_GFM_EXPORT 400 | void cmark_syntax_extension_set_opaque_alloc_func(cmark_syntax_extension *extension, 401 | cmark_opaque_alloc_func func); 402 | 403 | /** See the documentation for 'cmark_syntax_extension' 404 | */ 405 | CMARK_GFM_EXPORT 406 | void cmark_syntax_extension_set_opaque_free_func(cmark_syntax_extension *extension, 407 | cmark_opaque_free_func func); 408 | 409 | /** See the documentation for 'cmark_syntax_extension' 410 | */ 411 | CMARK_GFM_EXPORT 412 | void cmark_parser_set_backslash_ispunct_func(cmark_parser *parser, 413 | cmark_ispunct_func func); 414 | 415 | /** Return the index of the line currently being parsed, starting with 1. 416 | */ 417 | CMARK_GFM_EXPORT 418 | int cmark_parser_get_line_number(cmark_parser *parser); 419 | 420 | /** Return the offset in bytes in the line being processed. 421 | * 422 | * Example: 423 | * 424 | * ### foo 425 | * 426 | * Here, offset will first be 0, then 5 (the index of the 'f' character). 427 | */ 428 | CMARK_GFM_EXPORT 429 | int cmark_parser_get_offset(cmark_parser *parser); 430 | 431 | /** 432 | * Return the offset in 'columns' in the line being processed. 433 | * 434 | * This value may differ from the value returned by 435 | * cmark_parser_get_offset() in that it accounts for tabs, 436 | * and as such should not be used as an index in the current line's 437 | * buffer. 438 | * 439 | * Example: 440 | * 441 | * cmark_parser_advance_offset() can be called to advance the 442 | * offset by a number of columns, instead of a number of bytes. 443 | * 444 | * In that case, if offset falls "in the middle" of a tab 445 | * character, 'column' and offset will differ. 446 | * 447 | * ``` 448 | * foo \t bar 449 | * ^ ^^ 450 | * offset (0) 20 451 | * ``` 452 | * 453 | * If cmark_parser_advance_offset is called here with 'columns' 454 | * set to 'true' and 'offset' set to 22, cmark_parser_get_offset() 455 | * will return 20, whereas cmark_parser_get_column() will return 456 | * 22. 457 | * 458 | * Additionally, as tabs expand to the next multiple of 4 column, 459 | * cmark_parser_has_partially_consumed_tab() will now return 460 | * 'true'. 461 | */ 462 | CMARK_GFM_EXPORT 463 | int cmark_parser_get_column(cmark_parser *parser); 464 | 465 | /** Return the absolute index in bytes of the first nonspace 466 | * character coming after the offset as returned by 467 | * cmark_parser_get_offset() in the line currently being processed. 468 | * 469 | * Example: 470 | * 471 | * ``` 472 | * foo bar baz \n 473 | * ^ ^ ^ 474 | * 0 offset (16) first_nonspace (28) 475 | * ``` 476 | */ 477 | CMARK_GFM_EXPORT 478 | int cmark_parser_get_first_nonspace(cmark_parser *parser); 479 | 480 | /** Return the absolute index of the first nonspace column coming after 'offset' 481 | * in the line currently being processed, counting tabs as multiple 482 | * columns as appropriate. 483 | * 484 | * See the documentation for cmark_parser_get_first_nonspace() and 485 | * cmark_parser_get_column() for more information. 486 | */ 487 | CMARK_GFM_EXPORT 488 | int cmark_parser_get_first_nonspace_column(cmark_parser *parser); 489 | 490 | /** Return the difference between the values returned by 491 | * cmark_parser_get_first_nonspace_column() and 492 | * cmark_parser_get_column(). 493 | * 494 | * This is not a byte offset, as it can count one tab as multiple 495 | * characters. 496 | */ 497 | CMARK_GFM_EXPORT 498 | int cmark_parser_get_indent(cmark_parser *parser); 499 | 500 | /** Return 'true' if the line currently being processed has been entirely 501 | * consumed, 'false' otherwise. 502 | * 503 | * Example: 504 | * 505 | * ``` 506 | * foo bar baz \n 507 | * ^ 508 | * offset 509 | * ``` 510 | * 511 | * This function will return 'false' here. 512 | * 513 | * ``` 514 | * foo bar baz \n 515 | * ^ 516 | * offset 517 | * ``` 518 | * This function will still return 'false'. 519 | * 520 | * ``` 521 | * foo bar baz \n 522 | * ^ 523 | * offset 524 | * ``` 525 | * 526 | * At this point, this function will now return 'true'. 527 | */ 528 | CMARK_GFM_EXPORT 529 | int cmark_parser_is_blank(cmark_parser *parser); 530 | 531 | /** Return 'true' if the value returned by cmark_parser_get_offset() 532 | * is 'inside' an expanded tab. 533 | * 534 | * See the documentation for cmark_parser_get_column() for more 535 | * information. 536 | */ 537 | CMARK_GFM_EXPORT 538 | int cmark_parser_has_partially_consumed_tab(cmark_parser *parser); 539 | 540 | /** Return the length in bytes of the previously processed line, excluding potential 541 | * newline (\n) and carriage return (\r) trailing characters. 542 | */ 543 | CMARK_GFM_EXPORT 544 | int cmark_parser_get_last_line_length(cmark_parser *parser); 545 | 546 | /** Add a child to 'parent' during the parsing process. 547 | * 548 | * If 'parent' isn't the kind of node that can accept this child, 549 | * this function will back up till it hits a node that can, closing 550 | * blocks as appropriate. 551 | */ 552 | CMARK_GFM_EXPORT 553 | cmark_node*cmark_parser_add_child(cmark_parser *parser, 554 | cmark_node *parent, 555 | cmark_node_type block_type, 556 | int start_column); 557 | 558 | /** Advance the 'offset' of the parser in the current line. 559 | * 560 | * See the documentation of cmark_parser_get_offset() and 561 | * cmark_parser_get_column() for more information. 562 | */ 563 | CMARK_GFM_EXPORT 564 | void cmark_parser_advance_offset(cmark_parser *parser, 565 | const char *input, 566 | int count, 567 | int columns); 568 | 569 | 570 | CMARK_GFM_EXPORT 571 | void cmark_parser_feed_reentrant(cmark_parser *parser, const char *buffer, size_t len); 572 | 573 | /** Attach the syntax 'extension' to the 'parser', to provide extra syntax 574 | * rules. 575 | * See the documentation for cmark_syntax_extension for more information. 576 | * 577 | * Returns 'true' if the 'extension' was successfully attached, 578 | * 'false' otherwise. 579 | */ 580 | CMARK_GFM_EXPORT 581 | int cmark_parser_attach_syntax_extension(cmark_parser *parser, cmark_syntax_extension *extension); 582 | 583 | /** Change the type of 'node'. 584 | * 585 | * Return 0 if the type could be changed, 1 otherwise. 586 | */ 587 | CMARK_GFM_EXPORT int cmark_node_set_type(cmark_node *node, cmark_node_type type); 588 | 589 | /** Return the string content for all types of 'node'. 590 | * The pointer stays valid as long as 'node' isn't freed. 591 | */ 592 | CMARK_GFM_EXPORT const char *cmark_node_get_string_content(cmark_node *node); 593 | 594 | /** Set the string 'content' for all types of 'node'. 595 | * Copies 'content'. 596 | */ 597 | CMARK_GFM_EXPORT int cmark_node_set_string_content(cmark_node *node, const char *content); 598 | 599 | /** Get the syntax extension responsible for the creation of 'node'. 600 | * Return NULL if 'node' was created because it matched standard syntax rules. 601 | */ 602 | CMARK_GFM_EXPORT cmark_syntax_extension *cmark_node_get_syntax_extension(cmark_node *node); 603 | 604 | /** Set the syntax extension responsible for creating 'node'. 605 | */ 606 | CMARK_GFM_EXPORT int cmark_node_set_syntax_extension(cmark_node *node, 607 | cmark_syntax_extension *extension); 608 | 609 | /** 610 | * ## Inline syntax extension helpers 611 | * 612 | * The inline parsing process is described in detail at 613 | * 614 | */ 615 | 616 | /** Should return 'true' if the predicate matches 'c', 'false' otherwise 617 | */ 618 | typedef int (*cmark_inline_predicate)(int c); 619 | 620 | /** Advance the current inline parsing offset */ 621 | CMARK_GFM_EXPORT 622 | void cmark_inline_parser_advance_offset(cmark_inline_parser *parser); 623 | 624 | /** Get the current inline parsing offset */ 625 | CMARK_GFM_EXPORT 626 | int cmark_inline_parser_get_offset(cmark_inline_parser *parser); 627 | 628 | /** Set the offset in bytes in the chunk being processed by the given inline parser. 629 | */ 630 | CMARK_GFM_EXPORT 631 | void cmark_inline_parser_set_offset(cmark_inline_parser *parser, int offset); 632 | 633 | /** Gets the cmark_chunk being operated on by the given inline parser. 634 | * Use cmark_inline_parser_get_offset to get our current position in the chunk. 635 | */ 636 | CMARK_GFM_EXPORT 637 | struct cmark_chunk *cmark_inline_parser_get_chunk(cmark_inline_parser *parser); 638 | 639 | /** Returns 1 if the inline parser is currently in a bracket; pass 1 for 'image' 640 | * if you want to know about an image-type bracket, 0 for link-type. */ 641 | CMARK_GFM_EXPORT 642 | int cmark_inline_parser_in_bracket(cmark_inline_parser *parser, int image); 643 | 644 | /** Remove the last n characters from the last child of the given node. 645 | * This only works where all n characters are in the single last child, and the last 646 | * child is CMARK_NODE_TEXT. 647 | */ 648 | CMARK_GFM_EXPORT 649 | void cmark_node_unput(cmark_node *node, int n); 650 | 651 | 652 | /** Get the character located at the current inline parsing offset 653 | */ 654 | CMARK_GFM_EXPORT 655 | unsigned char cmark_inline_parser_peek_char(cmark_inline_parser *parser); 656 | 657 | /** Get the character located 'pos' bytes in the current line. 658 | */ 659 | CMARK_GFM_EXPORT 660 | unsigned char cmark_inline_parser_peek_at(cmark_inline_parser *parser, int pos); 661 | 662 | /** Whether the inline parser has reached the end of the current line 663 | */ 664 | CMARK_GFM_EXPORT 665 | int cmark_inline_parser_is_eof(cmark_inline_parser *parser); 666 | 667 | /** Get the characters located after the current inline parsing offset 668 | * while 'pred' matches. Free after usage. 669 | */ 670 | CMARK_GFM_EXPORT 671 | char *cmark_inline_parser_take_while(cmark_inline_parser *parser, cmark_inline_predicate pred); 672 | 673 | /** Push a delimiter on the delimiter stack. 674 | * See < for 675 | * more information on the parameters 676 | */ 677 | CMARK_GFM_EXPORT 678 | void cmark_inline_parser_push_delimiter(cmark_inline_parser *parser, 679 | unsigned char c, 680 | int can_open, 681 | int can_close, 682 | cmark_node *inl_text); 683 | 684 | /** Remove 'delim' from the delimiter stack 685 | */ 686 | CMARK_GFM_EXPORT 687 | void cmark_inline_parser_remove_delimiter(cmark_inline_parser *parser, delimiter *delim); 688 | 689 | CMARK_GFM_EXPORT 690 | delimiter *cmark_inline_parser_get_last_delimiter(cmark_inline_parser *parser); 691 | 692 | CMARK_GFM_EXPORT 693 | int cmark_inline_parser_get_line(cmark_inline_parser *parser); 694 | 695 | CMARK_GFM_EXPORT 696 | int cmark_inline_parser_get_column(cmark_inline_parser *parser); 697 | 698 | /** Convenience function to scan a given delimiter. 699 | * 700 | * 'left_flanking' and 'right_flanking' will be set to true if they 701 | * respectively precede and follow a non-space, non-punctuation 702 | * character. 703 | * 704 | * Additionally, 'punct_before' and 'punct_after' will respectively be set 705 | * if the preceding or following character is a punctuation character. 706 | * 707 | * Note that 'left_flanking' and 'right_flanking' can both be 'true'. 708 | * 709 | * Returns the number of delimiters encountered, in the limit 710 | * of 'max_delims', and advances the inline parsing offset. 711 | */ 712 | CMARK_GFM_EXPORT 713 | int cmark_inline_parser_scan_delimiters(cmark_inline_parser *parser, 714 | int max_delims, 715 | unsigned char c, 716 | int *left_flanking, 717 | int *right_flanking, 718 | int *punct_before, 719 | int *punct_after); 720 | 721 | CMARK_GFM_EXPORT 722 | void cmark_manage_extensions_special_characters(cmark_parser *parser, int add); 723 | 724 | CMARK_GFM_EXPORT 725 | cmark_llist *cmark_parser_get_syntax_extensions(cmark_parser *parser); 726 | 727 | CMARK_GFM_EXPORT 728 | void cmark_arena_push(void); 729 | 730 | CMARK_GFM_EXPORT 731 | int cmark_arena_pop(void); 732 | 733 | #ifdef __cplusplus 734 | } 735 | #endif 736 | 737 | #endif 738 | -------------------------------------------------------------------------------- /cmark/include/cmark-gfm.h: -------------------------------------------------------------------------------- 1 | #ifndef CMARK_GFM_H 2 | #define CMARK_GFM_H 3 | 4 | #include 5 | #include 6 | #include "cmark-gfm_export.h" 7 | #include "cmark-gfm_version.h" 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /** # NAME 14 | * 15 | * **cmark-gfm** - CommonMark parsing, manipulating, and rendering 16 | */ 17 | 18 | /** # DESCRIPTION 19 | * 20 | * ## Simple Interface 21 | */ 22 | 23 | /** Convert 'text' (assumed to be a UTF-8 encoded string with length 24 | * 'len') from CommonMark Markdown to HTML, returning a null-terminated, 25 | * UTF-8-encoded string. It is the caller's responsibility 26 | * to free the returned buffer. 27 | */ 28 | CMARK_GFM_EXPORT 29 | char *cmark_markdown_to_html(const char *text, size_t len, int options); 30 | 31 | /** ## Node Structure 32 | */ 33 | 34 | #define CMARK_NODE_TYPE_PRESENT (0x8000) 35 | #define CMARK_NODE_TYPE_BLOCK (CMARK_NODE_TYPE_PRESENT | 0x0000) 36 | #define CMARK_NODE_TYPE_INLINE (CMARK_NODE_TYPE_PRESENT | 0x4000) 37 | #define CMARK_NODE_TYPE_MASK (0xc000) 38 | #define CMARK_NODE_VALUE_MASK (0x3fff) 39 | 40 | typedef enum { 41 | /* Error status */ 42 | CMARK_NODE_NONE = 0x0000, 43 | 44 | /* Block */ 45 | CMARK_NODE_DOCUMENT = CMARK_NODE_TYPE_BLOCK | 0x0001, 46 | CMARK_NODE_BLOCK_QUOTE = CMARK_NODE_TYPE_BLOCK | 0x0002, 47 | CMARK_NODE_LIST = CMARK_NODE_TYPE_BLOCK | 0x0003, 48 | CMARK_NODE_ITEM = CMARK_NODE_TYPE_BLOCK | 0x0004, 49 | CMARK_NODE_CODE_BLOCK = CMARK_NODE_TYPE_BLOCK | 0x0005, 50 | CMARK_NODE_HTML_BLOCK = CMARK_NODE_TYPE_BLOCK | 0x0006, 51 | CMARK_NODE_CUSTOM_BLOCK = CMARK_NODE_TYPE_BLOCK | 0x0007, 52 | CMARK_NODE_PARAGRAPH = CMARK_NODE_TYPE_BLOCK | 0x0008, 53 | CMARK_NODE_HEADING = CMARK_NODE_TYPE_BLOCK | 0x0009, 54 | CMARK_NODE_THEMATIC_BREAK = CMARK_NODE_TYPE_BLOCK | 0x000a, 55 | CMARK_NODE_FOOTNOTE_DEFINITION = CMARK_NODE_TYPE_BLOCK | 0x000b, 56 | 57 | /* Inline */ 58 | CMARK_NODE_TEXT = CMARK_NODE_TYPE_INLINE | 0x0001, 59 | CMARK_NODE_SOFTBREAK = CMARK_NODE_TYPE_INLINE | 0x0002, 60 | CMARK_NODE_LINEBREAK = CMARK_NODE_TYPE_INLINE | 0x0003, 61 | CMARK_NODE_CODE = CMARK_NODE_TYPE_INLINE | 0x0004, 62 | CMARK_NODE_HTML_INLINE = CMARK_NODE_TYPE_INLINE | 0x0005, 63 | CMARK_NODE_CUSTOM_INLINE = CMARK_NODE_TYPE_INLINE | 0x0006, 64 | CMARK_NODE_EMPH = CMARK_NODE_TYPE_INLINE | 0x0007, 65 | CMARK_NODE_STRONG = CMARK_NODE_TYPE_INLINE | 0x0008, 66 | CMARK_NODE_LINK = CMARK_NODE_TYPE_INLINE | 0x0009, 67 | CMARK_NODE_IMAGE = CMARK_NODE_TYPE_INLINE | 0x000a, 68 | CMARK_NODE_FOOTNOTE_REFERENCE = CMARK_NODE_TYPE_INLINE | 0x000b, 69 | } cmark_node_type; 70 | 71 | extern cmark_node_type CMARK_NODE_LAST_BLOCK; 72 | extern cmark_node_type CMARK_NODE_LAST_INLINE; 73 | 74 | /* For backwards compatibility: */ 75 | #define CMARK_NODE_HEADER CMARK_NODE_HEADING 76 | #define CMARK_NODE_HRULE CMARK_NODE_THEMATIC_BREAK 77 | #define CMARK_NODE_HTML CMARK_NODE_HTML_BLOCK 78 | #define CMARK_NODE_INLINE_HTML CMARK_NODE_HTML_INLINE 79 | 80 | typedef enum { 81 | CMARK_NO_LIST, 82 | CMARK_BULLET_LIST, 83 | CMARK_ORDERED_LIST 84 | } cmark_list_type; 85 | 86 | typedef enum { 87 | CMARK_NO_DELIM, 88 | CMARK_PERIOD_DELIM, 89 | CMARK_PAREN_DELIM 90 | } cmark_delim_type; 91 | 92 | typedef struct cmark_node cmark_node; 93 | typedef struct cmark_parser cmark_parser; 94 | typedef struct cmark_iter cmark_iter; 95 | typedef struct cmark_syntax_extension cmark_syntax_extension; 96 | 97 | /** 98 | * ## Custom memory allocator support 99 | */ 100 | 101 | /** Defines the memory allocation functions to be used by CMark 102 | * when parsing and allocating a document tree 103 | */ 104 | typedef struct cmark_mem { 105 | void *(*calloc)(size_t, size_t); 106 | void *(*realloc)(void *, size_t); 107 | void (*free)(void *); 108 | } cmark_mem; 109 | 110 | /** The default memory allocator; uses the system's calloc, 111 | * realloc and free. 112 | */ 113 | CMARK_GFM_EXPORT 114 | cmark_mem *cmark_get_default_mem_allocator(void); 115 | 116 | /** An arena allocator; uses system calloc to allocate large 117 | * slabs of memory. Memory in these slabs is not reused at all. 118 | */ 119 | CMARK_GFM_EXPORT 120 | cmark_mem *cmark_get_arena_mem_allocator(void); 121 | 122 | /** Resets the arena allocator, quickly returning all used memory 123 | * to the operating system. 124 | */ 125 | CMARK_GFM_EXPORT 126 | void cmark_arena_reset(void); 127 | 128 | /** Callback for freeing user data with a 'cmark_mem' context. 129 | */ 130 | typedef void (*cmark_free_func) (cmark_mem *mem, void *user_data); 131 | 132 | 133 | /* 134 | * ## Basic data structures 135 | * 136 | * To keep dependencies to the strict minimum, libcmark implements 137 | * its own versions of "classic" data structures. 138 | */ 139 | 140 | /** 141 | * ### Linked list 142 | */ 143 | 144 | /** A generic singly linked list. 145 | */ 146 | typedef struct _cmark_llist 147 | { 148 | struct _cmark_llist *next; 149 | void *data; 150 | } cmark_llist; 151 | 152 | /** Append an element to the linked list, return the possibly modified 153 | * head of the list. 154 | */ 155 | CMARK_GFM_EXPORT 156 | cmark_llist * cmark_llist_append (cmark_mem * mem, 157 | cmark_llist * head, 158 | void * data); 159 | 160 | /** Free the list starting with 'head', calling 'free_func' with the 161 | * data pointer of each of its elements 162 | */ 163 | CMARK_GFM_EXPORT 164 | void cmark_llist_free_full (cmark_mem * mem, 165 | cmark_llist * head, 166 | cmark_free_func free_func); 167 | 168 | /** Free the list starting with 'head' 169 | */ 170 | CMARK_GFM_EXPORT 171 | void cmark_llist_free (cmark_mem * mem, 172 | cmark_llist * head); 173 | 174 | /** 175 | * ## Creating and Destroying Nodes 176 | */ 177 | 178 | /** Creates a new node of type 'type'. Note that the node may have 179 | * other required properties, which it is the caller's responsibility 180 | * to assign. 181 | */ 182 | CMARK_GFM_EXPORT cmark_node *cmark_node_new(cmark_node_type type); 183 | 184 | /** Same as `cmark_node_new`, but explicitly listing the memory 185 | * allocator used to allocate the node. Note: be sure to use the same 186 | * allocator for every node in a tree, or bad things can happen. 187 | */ 188 | CMARK_GFM_EXPORT cmark_node *cmark_node_new_with_mem(cmark_node_type type, 189 | cmark_mem *mem); 190 | 191 | CMARK_GFM_EXPORT cmark_node *cmark_node_new_with_ext(cmark_node_type type, 192 | cmark_syntax_extension *extension); 193 | 194 | CMARK_GFM_EXPORT cmark_node *cmark_node_new_with_mem_and_ext(cmark_node_type type, 195 | cmark_mem *mem, 196 | cmark_syntax_extension *extension); 197 | 198 | /** Frees the memory allocated for a node and any children. 199 | */ 200 | CMARK_GFM_EXPORT void cmark_node_free(cmark_node *node); 201 | 202 | /** 203 | * ## Tree Traversal 204 | */ 205 | 206 | /** Returns the next node in the sequence after 'node', or NULL if 207 | * there is none. 208 | */ 209 | CMARK_GFM_EXPORT cmark_node *cmark_node_next(cmark_node *node); 210 | 211 | /** Returns the previous node in the sequence after 'node', or NULL if 212 | * there is none. 213 | */ 214 | CMARK_GFM_EXPORT cmark_node *cmark_node_previous(cmark_node *node); 215 | 216 | /** Returns the parent of 'node', or NULL if there is none. 217 | */ 218 | CMARK_GFM_EXPORT cmark_node *cmark_node_parent(cmark_node *node); 219 | 220 | /** Returns the first child of 'node', or NULL if 'node' has no children. 221 | */ 222 | CMARK_GFM_EXPORT cmark_node *cmark_node_first_child(cmark_node *node); 223 | 224 | /** Returns the last child of 'node', or NULL if 'node' has no children. 225 | */ 226 | CMARK_GFM_EXPORT cmark_node *cmark_node_last_child(cmark_node *node); 227 | 228 | /** Returns the footnote reference of 'node', or NULL if 'node' doesn't have a 229 | * footnote reference. 230 | */ 231 | CMARK_GFM_EXPORT cmark_node *cmark_node_parent_footnote_def(cmark_node *node); 232 | 233 | /** 234 | * ## Iterator 235 | * 236 | * An iterator will walk through a tree of nodes, starting from a root 237 | * node, returning one node at a time, together with information about 238 | * whether the node is being entered or exited. The iterator will 239 | * first descend to a child node, if there is one. When there is no 240 | * child, the iterator will go to the next sibling. When there is no 241 | * next sibling, the iterator will return to the parent (but with 242 | * a 'cmark_event_type' of `CMARK_EVENT_EXIT`). The iterator will 243 | * return `CMARK_EVENT_DONE` when it reaches the root node again. 244 | * One natural application is an HTML renderer, where an `ENTER` event 245 | * outputs an open tag and an `EXIT` event outputs a close tag. 246 | * An iterator might also be used to transform an AST in some systematic 247 | * way, for example, turning all level-3 headings into regular paragraphs. 248 | * 249 | * void 250 | * usage_example(cmark_node *root) { 251 | * cmark_event_type ev_type; 252 | * cmark_iter *iter = cmark_iter_new(root); 253 | * 254 | * while ((ev_type = cmark_iter_next(iter)) != CMARK_EVENT_DONE) { 255 | * cmark_node *cur = cmark_iter_get_node(iter); 256 | * // Do something with `cur` and `ev_type` 257 | * } 258 | * 259 | * cmark_iter_free(iter); 260 | * } 261 | * 262 | * Iterators will never return `EXIT` events for leaf nodes, which are nodes 263 | * of type: 264 | * 265 | * * CMARK_NODE_HTML_BLOCK 266 | * * CMARK_NODE_THEMATIC_BREAK 267 | * * CMARK_NODE_CODE_BLOCK 268 | * * CMARK_NODE_TEXT 269 | * * CMARK_NODE_SOFTBREAK 270 | * * CMARK_NODE_LINEBREAK 271 | * * CMARK_NODE_CODE 272 | * * CMARK_NODE_HTML_INLINE 273 | * 274 | * Nodes must only be modified after an `EXIT` event, or an `ENTER` event for 275 | * leaf nodes. 276 | */ 277 | 278 | typedef enum { 279 | CMARK_EVENT_NONE, 280 | CMARK_EVENT_DONE, 281 | CMARK_EVENT_ENTER, 282 | CMARK_EVENT_EXIT 283 | } cmark_event_type; 284 | 285 | /** Creates a new iterator starting at 'root'. The current node and event 286 | * type are undefined until 'cmark_iter_next' is called for the first time. 287 | * The memory allocated for the iterator should be released using 288 | * 'cmark_iter_free' when it is no longer needed. 289 | */ 290 | CMARK_GFM_EXPORT 291 | cmark_iter *cmark_iter_new(cmark_node *root); 292 | 293 | /** Frees the memory allocated for an iterator. 294 | */ 295 | CMARK_GFM_EXPORT 296 | void cmark_iter_free(cmark_iter *iter); 297 | 298 | /** Advances to the next node and returns the event type (`CMARK_EVENT_ENTER`, 299 | * `CMARK_EVENT_EXIT` or `CMARK_EVENT_DONE`). 300 | */ 301 | CMARK_GFM_EXPORT 302 | cmark_event_type cmark_iter_next(cmark_iter *iter); 303 | 304 | /** Returns the current node. 305 | */ 306 | CMARK_GFM_EXPORT 307 | cmark_node *cmark_iter_get_node(cmark_iter *iter); 308 | 309 | /** Returns the current event type. 310 | */ 311 | CMARK_GFM_EXPORT 312 | cmark_event_type cmark_iter_get_event_type(cmark_iter *iter); 313 | 314 | /** Returns the root node. 315 | */ 316 | CMARK_GFM_EXPORT 317 | cmark_node *cmark_iter_get_root(cmark_iter *iter); 318 | 319 | /** Resets the iterator so that the current node is 'current' and 320 | * the event type is 'event_type'. The new current node must be a 321 | * descendant of the root node or the root node itself. 322 | */ 323 | CMARK_GFM_EXPORT 324 | void cmark_iter_reset(cmark_iter *iter, cmark_node *current, 325 | cmark_event_type event_type); 326 | 327 | /** 328 | * ## Accessors 329 | */ 330 | 331 | /** Returns the user data of 'node'. 332 | */ 333 | CMARK_GFM_EXPORT void *cmark_node_get_user_data(cmark_node *node); 334 | 335 | /** Sets arbitrary user data for 'node'. Returns 1 on success, 336 | * 0 on failure. 337 | */ 338 | CMARK_GFM_EXPORT int cmark_node_set_user_data(cmark_node *node, void *user_data); 339 | 340 | /** Set free function for user data */ 341 | CMARK_GFM_EXPORT 342 | int cmark_node_set_user_data_free_func(cmark_node *node, 343 | cmark_free_func free_func); 344 | 345 | /** Returns the type of 'node', or `CMARK_NODE_NONE` on error. 346 | */ 347 | CMARK_GFM_EXPORT cmark_node_type cmark_node_get_type(cmark_node *node); 348 | 349 | /** Like 'cmark_node_get_type', but returns a string representation 350 | of the type, or `""`. 351 | */ 352 | CMARK_GFM_EXPORT 353 | const char *cmark_node_get_type_string(cmark_node *node); 354 | 355 | /** Returns the string contents of 'node', or an empty 356 | string if none is set. Returns NULL if called on a 357 | node that does not have string content. 358 | */ 359 | CMARK_GFM_EXPORT const char *cmark_node_get_literal(cmark_node *node); 360 | 361 | /** Sets the string contents of 'node'. Returns 1 on success, 362 | * 0 on failure. 363 | */ 364 | CMARK_GFM_EXPORT int cmark_node_set_literal(cmark_node *node, const char *content); 365 | 366 | /** Returns the heading level of 'node', or 0 if 'node' is not a heading. 367 | */ 368 | CMARK_GFM_EXPORT int cmark_node_get_heading_level(cmark_node *node); 369 | 370 | /* For backwards compatibility */ 371 | #define cmark_node_get_header_level cmark_node_get_heading_level 372 | #define cmark_node_set_header_level cmark_node_set_heading_level 373 | 374 | /** Sets the heading level of 'node', returning 1 on success and 0 on error. 375 | */ 376 | CMARK_GFM_EXPORT int cmark_node_set_heading_level(cmark_node *node, int level); 377 | 378 | /** Returns the list type of 'node', or `CMARK_NO_LIST` if 'node' 379 | * is not a list. 380 | */ 381 | CMARK_GFM_EXPORT cmark_list_type cmark_node_get_list_type(cmark_node *node); 382 | 383 | /** Sets the list type of 'node', returning 1 on success and 0 on error. 384 | */ 385 | CMARK_GFM_EXPORT int cmark_node_set_list_type(cmark_node *node, 386 | cmark_list_type type); 387 | 388 | /** Returns the list delimiter type of 'node', or `CMARK_NO_DELIM` if 'node' 389 | * is not a list. 390 | */ 391 | CMARK_GFM_EXPORT cmark_delim_type cmark_node_get_list_delim(cmark_node *node); 392 | 393 | /** Sets the list delimiter type of 'node', returning 1 on success and 0 394 | * on error. 395 | */ 396 | CMARK_GFM_EXPORT int cmark_node_set_list_delim(cmark_node *node, 397 | cmark_delim_type delim); 398 | 399 | /** Returns starting number of 'node', if it is an ordered list, otherwise 0. 400 | */ 401 | CMARK_GFM_EXPORT int cmark_node_get_list_start(cmark_node *node); 402 | 403 | /** Sets starting number of 'node', if it is an ordered list. Returns 1 404 | * on success, 0 on failure. 405 | */ 406 | CMARK_GFM_EXPORT int cmark_node_set_list_start(cmark_node *node, int start); 407 | 408 | /** Returns 1 if 'node' is a tight list, 0 otherwise. 409 | */ 410 | CMARK_GFM_EXPORT int cmark_node_get_list_tight(cmark_node *node); 411 | 412 | /** Sets the "tightness" of a list. Returns 1 on success, 0 on failure. 413 | */ 414 | CMARK_GFM_EXPORT int cmark_node_set_list_tight(cmark_node *node, int tight); 415 | 416 | /** 417 | * Returns item index of 'node'. This is only used when rendering output 418 | * formats such as commonmark, which need to output the index. It is not 419 | * required for formats such as html or latex. 420 | */ 421 | CMARK_GFM_EXPORT int cmark_node_get_item_index(cmark_node *node); 422 | 423 | /** Sets item index of 'node'. Returns 1 on success, 0 on failure. 424 | */ 425 | CMARK_GFM_EXPORT int cmark_node_set_item_index(cmark_node *node, int idx); 426 | 427 | /** Returns the info string from a fenced code block. 428 | */ 429 | CMARK_GFM_EXPORT const char *cmark_node_get_fence_info(cmark_node *node); 430 | 431 | /** Sets the info string in a fenced code block, returning 1 on 432 | * success and 0 on failure. 433 | */ 434 | CMARK_GFM_EXPORT int cmark_node_set_fence_info(cmark_node *node, const char *info); 435 | 436 | /** Sets code blocks fencing details 437 | */ 438 | CMARK_GFM_EXPORT int cmark_node_set_fenced(cmark_node * node, int fenced, 439 | int length, int offset, char character); 440 | 441 | /** Returns code blocks fencing details 442 | */ 443 | CMARK_GFM_EXPORT int cmark_node_get_fenced(cmark_node *node, int *length, int *offset, char *character); 444 | 445 | /** Returns the URL of a link or image 'node', or an empty string 446 | if no URL is set. Returns NULL if called on a node that is 447 | not a link or image. 448 | */ 449 | CMARK_GFM_EXPORT const char *cmark_node_get_url(cmark_node *node); 450 | 451 | /** Sets the URL of a link or image 'node'. Returns 1 on success, 452 | * 0 on failure. 453 | */ 454 | CMARK_GFM_EXPORT int cmark_node_set_url(cmark_node *node, const char *url); 455 | 456 | /** Returns the title of a link or image 'node', or an empty 457 | string if no title is set. Returns NULL if called on a node 458 | that is not a link or image. 459 | */ 460 | CMARK_GFM_EXPORT const char *cmark_node_get_title(cmark_node *node); 461 | 462 | /** Sets the title of a link or image 'node'. Returns 1 on success, 463 | * 0 on failure. 464 | */ 465 | CMARK_GFM_EXPORT int cmark_node_set_title(cmark_node *node, const char *title); 466 | 467 | /** Returns the literal "on enter" text for a custom 'node', or 468 | an empty string if no on_enter is set. Returns NULL if called 469 | on a non-custom node. 470 | */ 471 | CMARK_GFM_EXPORT const char *cmark_node_get_on_enter(cmark_node *node); 472 | 473 | /** Sets the literal text to render "on enter" for a custom 'node'. 474 | Any children of the node will be rendered after this text. 475 | Returns 1 on success 0 on failure. 476 | */ 477 | CMARK_GFM_EXPORT int cmark_node_set_on_enter(cmark_node *node, 478 | const char *on_enter); 479 | 480 | /** Returns the literal "on exit" text for a custom 'node', or 481 | an empty string if no on_exit is set. Returns NULL if 482 | called on a non-custom node. 483 | */ 484 | CMARK_GFM_EXPORT const char *cmark_node_get_on_exit(cmark_node *node); 485 | 486 | /** Sets the literal text to render "on exit" for a custom 'node'. 487 | Any children of the node will be rendered before this text. 488 | Returns 1 on success 0 on failure. 489 | */ 490 | CMARK_GFM_EXPORT int cmark_node_set_on_exit(cmark_node *node, const char *on_exit); 491 | 492 | /** Returns the line on which 'node' begins. 493 | */ 494 | CMARK_GFM_EXPORT int cmark_node_get_start_line(cmark_node *node); 495 | 496 | /** Returns the column at which 'node' begins. 497 | */ 498 | CMARK_GFM_EXPORT int cmark_node_get_start_column(cmark_node *node); 499 | 500 | /** Returns the line on which 'node' ends. 501 | */ 502 | CMARK_GFM_EXPORT int cmark_node_get_end_line(cmark_node *node); 503 | 504 | /** Returns the column at which 'node' ends. 505 | */ 506 | CMARK_GFM_EXPORT int cmark_node_get_end_column(cmark_node *node); 507 | 508 | /** 509 | * ## Tree Manipulation 510 | */ 511 | 512 | /** Unlinks a 'node', removing it from the tree, but not freeing its 513 | * memory. (Use 'cmark_node_free' for that.) 514 | */ 515 | CMARK_GFM_EXPORT void cmark_node_unlink(cmark_node *node); 516 | 517 | /** Inserts 'sibling' before 'node'. Returns 1 on success, 0 on failure. 518 | */ 519 | CMARK_GFM_EXPORT int cmark_node_insert_before(cmark_node *node, 520 | cmark_node *sibling); 521 | 522 | /** Inserts 'sibling' after 'node'. Returns 1 on success, 0 on failure. 523 | */ 524 | CMARK_GFM_EXPORT int cmark_node_insert_after(cmark_node *node, cmark_node *sibling); 525 | 526 | /** Replaces 'oldnode' with 'newnode' and unlinks 'oldnode' (but does 527 | * not free its memory). 528 | * Returns 1 on success, 0 on failure. 529 | */ 530 | CMARK_GFM_EXPORT int cmark_node_replace(cmark_node *oldnode, cmark_node *newnode); 531 | 532 | /** Adds 'child' to the beginning of the children of 'node'. 533 | * Returns 1 on success, 0 on failure. 534 | */ 535 | CMARK_GFM_EXPORT int cmark_node_prepend_child(cmark_node *node, cmark_node *child); 536 | 537 | /** Adds 'child' to the end of the children of 'node'. 538 | * Returns 1 on success, 0 on failure. 539 | */ 540 | CMARK_GFM_EXPORT int cmark_node_append_child(cmark_node *node, cmark_node *child); 541 | 542 | /** Consolidates adjacent text nodes. 543 | */ 544 | CMARK_GFM_EXPORT void cmark_consolidate_text_nodes(cmark_node *root); 545 | 546 | /** Ensures a node and all its children own their own chunk memory. 547 | */ 548 | CMARK_GFM_EXPORT void cmark_node_own(cmark_node *root); 549 | 550 | /** 551 | * ## Parsing 552 | * 553 | * Simple interface: 554 | * 555 | * cmark_node *document = cmark_parse_document("Hello *world*", 13, 556 | * CMARK_OPT_DEFAULT); 557 | * 558 | * Streaming interface: 559 | * 560 | * cmark_parser *parser = cmark_parser_new(CMARK_OPT_DEFAULT); 561 | * FILE *fp = fopen("myfile.md", "rb"); 562 | * while ((bytes = fread(buffer, 1, sizeof(buffer), fp)) > 0) { 563 | * cmark_parser_feed(parser, buffer, bytes); 564 | * if (bytes < sizeof(buffer)) { 565 | * break; 566 | * } 567 | * } 568 | * document = cmark_parser_finish(parser); 569 | * cmark_parser_free(parser); 570 | */ 571 | 572 | /** Creates a new parser object. 573 | */ 574 | CMARK_GFM_EXPORT 575 | cmark_parser *cmark_parser_new(int options); 576 | 577 | /** Creates a new parser object with the given memory allocator 578 | */ 579 | CMARK_GFM_EXPORT 580 | cmark_parser *cmark_parser_new_with_mem(int options, cmark_mem *mem); 581 | 582 | /** Frees memory allocated for a parser object. 583 | */ 584 | CMARK_GFM_EXPORT 585 | void cmark_parser_free(cmark_parser *parser); 586 | 587 | /** Feeds a string of length 'len' to 'parser'. 588 | */ 589 | CMARK_GFM_EXPORT 590 | void cmark_parser_feed(cmark_parser *parser, const char *buffer, size_t len); 591 | 592 | /** Finish parsing and return a pointer to a tree of nodes. 593 | */ 594 | CMARK_GFM_EXPORT 595 | cmark_node *cmark_parser_finish(cmark_parser *parser); 596 | 597 | /** Parse a CommonMark document in 'buffer' of length 'len'. 598 | * Returns a pointer to a tree of nodes. The memory allocated for 599 | * the node tree should be released using 'cmark_node_free' 600 | * when it is no longer needed. 601 | */ 602 | CMARK_GFM_EXPORT 603 | cmark_node *cmark_parse_document(const char *buffer, size_t len, int options); 604 | 605 | /** Parse a CommonMark document in file 'f', returning a pointer to 606 | * a tree of nodes. The memory allocated for the node tree should be 607 | * released using 'cmark_node_free' when it is no longer needed. 608 | */ 609 | CMARK_GFM_EXPORT 610 | cmark_node *cmark_parse_file(FILE *f, int options); 611 | 612 | /** 613 | * ## Rendering 614 | */ 615 | 616 | /** Render a 'node' tree as XML. It is the caller's responsibility 617 | * to free the returned buffer. 618 | */ 619 | CMARK_GFM_EXPORT 620 | char *cmark_render_xml(cmark_node *root, int options); 621 | 622 | /** As for 'cmark_render_xml', but specifying the allocator to use for 623 | * the resulting string. 624 | */ 625 | CMARK_GFM_EXPORT 626 | char *cmark_render_xml_with_mem(cmark_node *root, int options, cmark_mem *mem); 627 | 628 | /** Render a 'node' tree as an HTML fragment. It is up to the user 629 | * to add an appropriate header and footer. It is the caller's 630 | * responsibility to free the returned buffer. 631 | */ 632 | CMARK_GFM_EXPORT 633 | char *cmark_render_html(cmark_node *root, int options, cmark_llist *extensions); 634 | 635 | /** As for 'cmark_render_html', but specifying the allocator to use for 636 | * the resulting string. 637 | */ 638 | CMARK_GFM_EXPORT 639 | char *cmark_render_html_with_mem(cmark_node *root, int options, cmark_llist *extensions, cmark_mem *mem); 640 | 641 | /** Render a 'node' tree as a groff man page, without the header. 642 | * It is the caller's responsibility to free the returned buffer. 643 | */ 644 | CMARK_GFM_EXPORT 645 | char *cmark_render_man(cmark_node *root, int options, int width); 646 | 647 | /** As for 'cmark_render_man', but specifying the allocator to use for 648 | * the resulting string. 649 | */ 650 | CMARK_GFM_EXPORT 651 | char *cmark_render_man_with_mem(cmark_node *root, int options, int width, cmark_mem *mem); 652 | 653 | /** Render a 'node' tree as a commonmark document. 654 | * It is the caller's responsibility to free the returned buffer. 655 | */ 656 | CMARK_GFM_EXPORT 657 | char *cmark_render_commonmark(cmark_node *root, int options, int width); 658 | 659 | /** As for 'cmark_render_commonmark', but specifying the allocator to use for 660 | * the resulting string. 661 | */ 662 | CMARK_GFM_EXPORT 663 | char *cmark_render_commonmark_with_mem(cmark_node *root, int options, int width, cmark_mem *mem); 664 | 665 | /** Render a 'node' tree as a plain text document. 666 | * It is the caller's responsibility to free the returned buffer. 667 | */ 668 | CMARK_GFM_EXPORT 669 | char *cmark_render_plaintext(cmark_node *root, int options, int width); 670 | 671 | /** As for 'cmark_render_plaintext', but specifying the allocator to use for 672 | * the resulting string. 673 | */ 674 | CMARK_GFM_EXPORT 675 | char *cmark_render_plaintext_with_mem(cmark_node *root, int options, int width, cmark_mem *mem); 676 | 677 | /** Render a 'node' tree as a LaTeX document. 678 | * It is the caller's responsibility to free the returned buffer. 679 | */ 680 | CMARK_GFM_EXPORT 681 | char *cmark_render_latex(cmark_node *root, int options, int width); 682 | 683 | /** As for 'cmark_render_latex', but specifying the allocator to use for 684 | * the resulting string. 685 | */ 686 | CMARK_GFM_EXPORT 687 | char *cmark_render_latex_with_mem(cmark_node *root, int options, int width, cmark_mem *mem); 688 | 689 | /** 690 | * ## Options 691 | */ 692 | 693 | /** Default options. 694 | */ 695 | #define CMARK_OPT_DEFAULT 0 696 | 697 | /** 698 | * ### Options affecting rendering 699 | */ 700 | 701 | /** Include a `data-sourcepos` attribute on all block elements. 702 | */ 703 | #define CMARK_OPT_SOURCEPOS (1 << 1) 704 | 705 | /** Render `softbreak` elements as hard line breaks. 706 | */ 707 | #define CMARK_OPT_HARDBREAKS (1 << 2) 708 | 709 | /** `CMARK_OPT_SAFE` is defined here for API compatibility, 710 | but it no longer has any effect. "Safe" mode is now the default: 711 | set `CMARK_OPT_UNSAFE` to disable it. 712 | */ 713 | #define CMARK_OPT_SAFE (1 << 3) 714 | 715 | /** Render raw HTML and unsafe links (`javascript:`, `vbscript:`, 716 | * `file:`, and `data:`, except for `image/png`, `image/gif`, 717 | * `image/jpeg`, or `image/webp` mime types). By default, 718 | * raw HTML is replaced by a placeholder HTML comment. Unsafe 719 | * links are replaced by empty strings. 720 | */ 721 | #define CMARK_OPT_UNSAFE (1 << 17) 722 | 723 | /** Render `softbreak` elements as spaces. 724 | */ 725 | #define CMARK_OPT_NOBREAKS (1 << 4) 726 | 727 | /** 728 | * ### Options affecting parsing 729 | */ 730 | 731 | /** Legacy option (no effect). 732 | */ 733 | #define CMARK_OPT_NORMALIZE (1 << 8) 734 | 735 | /** Validate UTF-8 in the input before parsing, replacing illegal 736 | * sequences with the replacement character U+FFFD. 737 | */ 738 | #define CMARK_OPT_VALIDATE_UTF8 (1 << 9) 739 | 740 | /** Convert straight quotes to curly, --- to em dashes, -- to en dashes. 741 | */ 742 | #define CMARK_OPT_SMART (1 << 10) 743 | 744 | /** Use GitHub-style
     tags for code blocks instead of 
    .
    746 |  */
    747 | #define CMARK_OPT_GITHUB_PRE_LANG (1 << 11)
    748 | 
    749 | /** Be liberal in interpreting inline HTML tags.
    750 |  */
    751 | #define CMARK_OPT_LIBERAL_HTML_TAG (1 << 12)
    752 | 
    753 | /** Parse footnotes.
    754 |  */
    755 | #define CMARK_OPT_FOOTNOTES (1 << 13)
    756 | 
    757 | /** Only parse strikethroughs if surrounded by exactly 2 tildes.
    758 |  * Gives some compatibility with redcarpet.
    759 |  */
    760 | #define CMARK_OPT_STRIKETHROUGH_DOUBLE_TILDE (1 << 14)
    761 | 
    762 | /** Use style attributes to align table cells instead of align attributes.
    763 |  */
    764 | #define CMARK_OPT_TABLE_PREFER_STYLE_ATTRIBUTES (1 << 15)
    765 | 
    766 | /** Include the remainder of the info string in code blocks in
    767 |  * a separate attribute.
    768 |  */
    769 | #define CMARK_OPT_FULL_INFO_STRING (1 << 16)
    770 | 
    771 | /**
    772 |  * ## Version information
    773 |  */
    774 | 
    775 | /** The library version as integer for runtime checks. Also available as
    776 |  * macro CMARK_VERSION for compile time checks.
    777 |  *
    778 |  * * Bits 16-23 contain the major version.
    779 |  * * Bits 8-15 contain the minor version.
    780 |  * * Bits 0-7 contain the patchlevel.
    781 |  *
    782 |  * In hexadecimal format, the number 0x010203 represents version 1.2.3.
    783 |  */
    784 | CMARK_GFM_EXPORT
    785 | int cmark_version(void);
    786 | 
    787 | /** The library version string for runtime checks. Also available as
    788 |  * macro CMARK_VERSION_STRING for compile time checks.
    789 |  */
    790 | CMARK_GFM_EXPORT
    791 | const char *cmark_version_string(void);
    792 | 
    793 | /** # AUTHORS
    794 |  *
    795 |  * John MacFarlane, Vicent Marti,  Kārlis Gaņģis, Nick Wellnhofer.
    796 |  */
    797 | 
    798 | #ifndef CMARK_NO_SHORT_NAMES
    799 | #define NODE_DOCUMENT CMARK_NODE_DOCUMENT
    800 | #define NODE_BLOCK_QUOTE CMARK_NODE_BLOCK_QUOTE
    801 | #define NODE_LIST CMARK_NODE_LIST
    802 | #define NODE_ITEM CMARK_NODE_ITEM
    803 | #define NODE_CODE_BLOCK CMARK_NODE_CODE_BLOCK
    804 | #define NODE_HTML_BLOCK CMARK_NODE_HTML_BLOCK
    805 | #define NODE_CUSTOM_BLOCK CMARK_NODE_CUSTOM_BLOCK
    806 | #define NODE_PARAGRAPH CMARK_NODE_PARAGRAPH
    807 | #define NODE_HEADING CMARK_NODE_HEADING
    808 | #define NODE_HEADER CMARK_NODE_HEADER
    809 | #define NODE_THEMATIC_BREAK CMARK_NODE_THEMATIC_BREAK
    810 | #define NODE_HRULE CMARK_NODE_HRULE
    811 | #define NODE_TEXT CMARK_NODE_TEXT
    812 | #define NODE_SOFTBREAK CMARK_NODE_SOFTBREAK
    813 | #define NODE_LINEBREAK CMARK_NODE_LINEBREAK
    814 | #define NODE_CODE CMARK_NODE_CODE
    815 | #define NODE_HTML_INLINE CMARK_NODE_HTML_INLINE
    816 | #define NODE_CUSTOM_INLINE CMARK_NODE_CUSTOM_INLINE
    817 | #define NODE_EMPH CMARK_NODE_EMPH
    818 | #define NODE_STRONG CMARK_NODE_STRONG
    819 | #define NODE_LINK CMARK_NODE_LINK
    820 | #define NODE_IMAGE CMARK_NODE_IMAGE
    821 | #define BULLET_LIST CMARK_BULLET_LIST
    822 | #define ORDERED_LIST CMARK_ORDERED_LIST
    823 | #define PERIOD_DELIM CMARK_PERIOD_DELIM
    824 | #define PAREN_DELIM CMARK_PAREN_DELIM
    825 | #endif
    826 | 
    827 | typedef int32_t bufsize_t;
    828 | 
    829 | #ifdef __cplusplus
    830 | }
    831 | #endif
    832 | 
    833 | #endif
    834 | 
    
    
    --------------------------------------------------------------------------------
    /cmark/include/cmark-gfm_export.h:
    --------------------------------------------------------------------------------
     1 | 
     2 | #ifndef CMARK_GFM_EXPORT_H
     3 | #define CMARK_GFM_EXPORT_H
     4 | 
     5 | #ifdef CMARK_GFM_STATIC_DEFINE
     6 | #  define CMARK_GFM_EXPORT
     7 | #  define CMARK_GFM_NO_EXPORT
     8 | #else
     9 | #  ifndef CMARK_GFM_EXPORT
    10 | #    ifdef libcmark_gfm_EXPORTS
    11 |         /* We are building this library */
    12 | #      define CMARK_GFM_EXPORT __attribute__((visibility("default")))
    13 | #    else
    14 |         /* We are using this library */
    15 | #      define CMARK_GFM_EXPORT __attribute__((visibility("default")))
    16 | #    endif
    17 | #  endif
    18 | 
    19 | #  ifndef CMARK_GFM_NO_EXPORT
    20 | #    define CMARK_GFM_NO_EXPORT __attribute__((visibility("hidden")))
    21 | #  endif
    22 | #endif
    23 | 
    24 | #ifndef CMARK_GFM_DEPRECATED
    25 | #  define CMARK_GFM_DEPRECATED __attribute__ ((__deprecated__))
    26 | #endif
    27 | 
    28 | #ifndef CMARK_GFM_DEPRECATED_EXPORT
    29 | #  define CMARK_GFM_DEPRECATED_EXPORT CMARK_GFM_EXPORT CMARK_GFM_DEPRECATED
    30 | #endif
    31 | 
    32 | #ifndef CMARK_GFM_DEPRECATED_NO_EXPORT
    33 | #  define CMARK_GFM_DEPRECATED_NO_EXPORT CMARK_GFM_NO_EXPORT CMARK_GFM_DEPRECATED
    34 | #endif
    35 | 
    36 | #if 0 /* DEFINE_NO_DEPRECATED */
    37 | #  ifndef CMARK_GFM_NO_DEPRECATED
    38 | #    define CMARK_GFM_NO_DEPRECATED
    39 | #  endif
    40 | #endif
    41 | 
    42 | #endif /* CMARK_GFM_EXPORT_H */
    43 | 
    
    
    --------------------------------------------------------------------------------
    /cmark/include/cmark-gfm_version.h:
    --------------------------------------------------------------------------------
    1 | #ifndef CMARK_GFM_VERSION_H
    2 | #define CMARK_GFM_VERSION_H
    3 | 
    4 | #define CMARK_GFM_VERSION ((0 << 24) | (29 << 16) | (0 << 8) | 13)
    5 | #define CMARK_GFM_VERSION_STRING "0.29.0.gfm.13"
    6 | 
    7 | #endif
    8 | 
    
    
    --------------------------------------------------------------------------------
    /cmark/include/config.h:
    --------------------------------------------------------------------------------
     1 | #ifndef CMARK_CONFIG_H
     2 | #define CMARK_CONFIG_H
     3 | 
     4 | #ifdef __cplusplus
     5 | extern "C" {
     6 | #endif
     7 | 
     8 | #define HAVE_STDBOOL_H
     9 | 
    10 | #ifdef HAVE_STDBOOL_H
    11 |   #include 
    12 | #elif !defined(__cplusplus)
    13 |   typedef char bool;
    14 | #endif
    15 | 
    16 | #define HAVE___BUILTIN_EXPECT
    17 | 
    18 | #define HAVE___ATTRIBUTE__
    19 | 
    20 | #ifdef HAVE___ATTRIBUTE__
    21 |   #define CMARK_ATTRIBUTE(list) __attribute__ (list)
    22 | #else
    23 |   #define CMARK_ATTRIBUTE(list)
    24 | #endif
    25 | 
    26 | #ifndef CMARK_INLINE
    27 |   #if defined(_MSC_VER) && !defined(__cplusplus)
    28 |     #define CMARK_INLINE __inline
    29 |   #else
    30 |     #define CMARK_INLINE inline
    31 |   #endif
    32 | #endif
    33 | 
    34 | /* snprintf and vsnprintf fallbacks for MSVC before 2015,
    35 |    due to Valentin Milea http://stackoverflow.com/questions/2915672/
    36 | */
    37 | 
    38 | #if defined(_MSC_VER) && _MSC_VER < 1900
    39 | 
    40 | #include 
    41 | #include 
    42 | 
    43 | #define snprintf c99_snprintf
    44 | #define vsnprintf c99_vsnprintf
    45 | 
    46 | CMARK_INLINE int c99_vsnprintf(char *outBuf, size_t size, const char *format, va_list ap)
    47 | {
    48 |     int count = -1;
    49 | 
    50 |     if (size != 0)
    51 |         count = _vsnprintf_s(outBuf, size, _TRUNCATE, format, ap);
    52 |     if (count == -1)
    53 |         count = _vscprintf(format, ap);
    54 | 
    55 |     return count;
    56 | }
    57 | 
    58 | CMARK_INLINE int c99_snprintf(char *outBuf, size_t size, const char *format, ...)
    59 | {
    60 |     int count;
    61 |     va_list ap;
    62 | 
    63 |     va_start(ap, format);
    64 |     count = c99_vsnprintf(outBuf, size, format, ap);
    65 |     va_end(ap);
    66 | 
    67 |     return count;
    68 | }
    69 | 
    70 | #endif
    71 | 
    72 | #ifdef __cplusplus
    73 | }
    74 | #endif
    75 | 
    76 | #endif
    77 | 
    
    
    --------------------------------------------------------------------------------
    /cmark/lib/libcmark-gfm-extensions.a:
    --------------------------------------------------------------------------------
    https://raw.githubusercontent.com/Watson1978/QLMarkdownGFM/13af9f1e05d96bece6bbe516b7f6a7d2a54543e1/cmark/lib/libcmark-gfm-extensions.a
    
    
    --------------------------------------------------------------------------------
    /cmark/lib/libcmark-gfm.a:
    --------------------------------------------------------------------------------
    https://raw.githubusercontent.com/Watson1978/QLMarkdownGFM/13af9f1e05d96bece6bbe516b7f6a7d2a54543e1/cmark/lib/libcmark-gfm.a
    
    
    --------------------------------------------------------------------------------
    /entitlements.plist:
    --------------------------------------------------------------------------------
     1 | 
     2 | 
     3 |     
     4 |     
     5 |         com.apple.security.app-sandbox
     6 |         
     7 |         com.apple.security.network.client
     8 |         
     9 |     
    10 | 
    
    
    --------------------------------------------------------------------------------
    /images/preview.png:
    --------------------------------------------------------------------------------
    https://raw.githubusercontent.com/Watson1978/QLMarkdownGFM/13af9f1e05d96bece6bbe516b7f6a7d2a54543e1/images/preview.png
    
    
    --------------------------------------------------------------------------------
    /images/thumbnail.png:
    --------------------------------------------------------------------------------
    https://raw.githubusercontent.com/Watson1978/QLMarkdownGFM/13af9f1e05d96bece6bbe516b7f6a7d2a54543e1/images/thumbnail.png
    
    
    --------------------------------------------------------------------------------
    /install-cmark.sh:
    --------------------------------------------------------------------------------
     1 | #!/bin/bash
     2 | 
     3 | CMARK_VERSION_TAG="0.29.0.gfm.13"
     4 | 
     5 | PROJECT_DIR=`pwd`
     6 | rm -rf $PROJECT_DIR/cmark
     7 | 
     8 | cd /tmp
     9 | 
    10 | git clone https://github.com/github/cmark-gfm.git --branch $CMARK_VERSION_TAG --depth 1
    11 | cd cmark-gfm
    12 | 
    13 | mkdir build
    14 | cd build
    15 | 
    16 | cmake -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="$PROJECT_DIR/cmark" -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.11" ..
    17 | make -j
    18 | make install
    19 | cp ./src/config.h $PROJECT_DIR/cmark/include
    20 | 
    21 | rm -rf $PROJECT_DIR/cmark/bin
    22 | rm -rf $PROJECT_DIR/cmark/share
    23 | rm -rf $PROJECT_DIR/cmark/lib/*.dylib
    24 | 
    
    
    --------------------------------------------------------------------------------
    /release.sh:
    --------------------------------------------------------------------------------
     1 | #!/bin/bash
     2 | 
     3 | rm -rf build
     4 | xcodebuild clean
     5 | xcodebuild -workspace QLMarkdownGFM.xcworkspace -scheme QLMarkdownGFM -arch x86_64 -arch arm64 -configuration Release -derivedDataPath build
     6 | 
     7 | codesign --force --verify --verbose --sign "Developer ID Application: Shizuo Fujita (3E97Y6CS78)" \
     8 |     build/Build/Products/Release/QLMarkdownGFM.qlgenerator \
     9 |     --deep \
    10 |     --options runtime \
    11 |     --entitlements entitlements.plist \
    12 |     --timestamp
    13 | 
    14 | ditto -V -c -k --keepParent build/Build/Products/Release/QLMarkdownGFM.qlgenerator build/QLMarkdownGFM.qlgenerator.zip
    15 | 
    16 | PASSWORD=$(security find-generic-password -a watson -s Notarization -w)
    17 | 
    18 | xcrun altool --notarize-app -t osx -f build/QLMarkdownGFM.qlgenerator.zip \
    19 |     --primary-bundle-id jp.cat-soft.QLMarkdownGFM \
    20 |     -u "watson1978@gmail.com" \
    21 |     -p $PASSWORD
    22 | 
    
    
    --------------------------------------------------------------------------------