├── QLCommonMark
├── cmark
│ ├── libcmark.a
│ ├── cmark_version.h
│ ├── cmark_export.h
│ └── cmark.h
├── Resources
│ └── themes
│ │ └── bootstrap
│ │ ├── fonts
│ │ ├── glyphicons-halflings-regular.eot
│ │ ├── glyphicons-halflings-regular.ttf
│ │ ├── glyphicons-halflings-regular.woff
│ │ ├── glyphicons-halflings-regular.woff2
│ │ └── glyphicons-halflings-regular.svg
│ │ └── css
│ │ ├── bootstrap-theme.min.custom.css
│ │ ├── custom.min.css
│ │ └── bootstrap-theme.min.css
├── common_mark.h
├── shared.h
├── GenerateThumbnailForURL.m
├── GeneratePreviewForURL.m
├── Info.plist
├── common_mark.m
└── main.c
├── QLCommonMark.xcodeproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
└── project.pbxproj
├── .gitignore
├── LICENSE
└── README.md
/QLCommonMark/cmark/libcmark.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/digitalmoksha/QLCommonMark/HEAD/QLCommonMark/cmark/libcmark.a
--------------------------------------------------------------------------------
/QLCommonMark/cmark/cmark_version.h:
--------------------------------------------------------------------------------
1 | #ifndef CMARK_VERSION_H
2 | #define CMARK_VERSION_H
3 |
4 | #define CMARK_VERSION ((0 << 16) | (27 << 8) | 1)
5 | #define CMARK_VERSION_STRING "0.27.1"
6 |
7 | #endif
8 |
--------------------------------------------------------------------------------
/QLCommonMark/Resources/themes/bootstrap/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/digitalmoksha/QLCommonMark/HEAD/QLCommonMark/Resources/themes/bootstrap/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/QLCommonMark/Resources/themes/bootstrap/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/digitalmoksha/QLCommonMark/HEAD/QLCommonMark/Resources/themes/bootstrap/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/QLCommonMark/Resources/themes/bootstrap/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/digitalmoksha/QLCommonMark/HEAD/QLCommonMark/Resources/themes/bootstrap/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/QLCommonMark/Resources/themes/bootstrap/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/digitalmoksha/QLCommonMark/HEAD/QLCommonMark/Resources/themes/bootstrap/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/QLCommonMark.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/QLCommonMark/common_mark.h:
--------------------------------------------------------------------------------
1 | //
2 | // common_mark.h
3 | // CommonMark QuickLook
4 | //
5 | // Created by Brett Walker on 4/12/17.
6 | // Copyright © 2017 digitalMoksha. All rights reserved.
7 | //
8 |
9 | #ifndef common_mark_h
10 | #define common_mark_h
11 |
12 | NSData* render_markdown_cmark(NSURL* url);
13 |
14 | #endif /* common_mark_h */
15 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData/
8 |
9 | ## Various settings
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata/
19 |
20 | ## Other
21 | *.moved-aside
22 | *.xccheckout
23 | *.xcscmblueprint
24 |
--------------------------------------------------------------------------------
/QLCommonMark/shared.h:
--------------------------------------------------------------------------------
1 | //
2 | // shared.h
3 | // QLCommonMark
4 | //
5 | // Created by Brett Walker on 4/12/17.
6 | // Copyright © 2017 digitalMoksha. All rights reserved.
7 | //
8 |
9 | #ifndef shared_h
10 | #define shared_h
11 |
12 | #include
13 | #include
14 | #include
15 |
16 | #import
17 | #import
18 | #import
19 |
20 | static NSString * const kPluginBundleId = @"com.digitalmoksha.QLCommonMark";
21 | static BOOL const kLogDebug = NO;
22 |
23 | #endif /* shared_h */
24 |
--------------------------------------------------------------------------------
/QLCommonMark/GenerateThumbnailForURL.m:
--------------------------------------------------------------------------------
1 | #include "shared.h"
2 |
3 | OSStatus GenerateThumbnailForURL(void *thisInterface, QLThumbnailRequestRef thumbnail, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options, CGSize maxSize);
4 | void CancelThumbnailGeneration(void *thisInterface, QLThumbnailRequestRef thumbnail);
5 |
6 | /* -----------------------------------------------------------------------------
7 | Generate a thumbnail for file
8 |
9 | This function's job is to create thumbnail for designated file as fast as possible
10 | ----------------------------------------------------------------------------- */
11 |
12 | OSStatus GenerateThumbnailForURL(void *thisInterface, QLThumbnailRequestRef thumbnail, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options, CGSize maxSize)
13 | {
14 | // To complete your generator please implement the function GenerateThumbnailForURL in GenerateThumbnailForURL.c
15 | return noErr;
16 | }
17 |
18 | void CancelThumbnailGeneration(void *thisInterface, QLThumbnailRequestRef thumbnail)
19 | {
20 | // Implement only if supported
21 | }
22 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 digitalMoksha
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/QLCommonMark/cmark/cmark_export.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef CMARK_EXPORT_H
3 | #define CMARK_EXPORT_H
4 |
5 | #ifdef CMARK_STATIC_DEFINE
6 | # define CMARK_EXPORT
7 | # define CMARK_NO_EXPORT
8 | #else
9 | # ifndef CMARK_EXPORT
10 | # ifdef libcmark_EXPORTS
11 | /* We are building this library */
12 | # define CMARK_EXPORT __attribute__((visibility("default")))
13 | # else
14 | /* We are using this library */
15 | # define CMARK_EXPORT __attribute__((visibility("default")))
16 | # endif
17 | # endif
18 |
19 | # ifndef CMARK_NO_EXPORT
20 | # define CMARK_NO_EXPORT __attribute__((visibility("hidden")))
21 | # endif
22 | #endif
23 |
24 | #ifndef CMARK_DEPRECATED
25 | # define CMARK_DEPRECATED __attribute__ ((__deprecated__))
26 | #endif
27 |
28 | #ifndef CMARK_DEPRECATED_EXPORT
29 | # define CMARK_DEPRECATED_EXPORT CMARK_EXPORT CMARK_DEPRECATED
30 | #endif
31 |
32 | #ifndef CMARK_DEPRECATED_NO_EXPORT
33 | # define CMARK_DEPRECATED_NO_EXPORT CMARK_NO_EXPORT CMARK_DEPRECATED
34 | #endif
35 |
36 | #if 0 /* DEFINE_NO_DEPRECATED */
37 | # ifndef CMARK_NO_DEPRECATED
38 | # define CMARK_NO_DEPRECATED
39 | # endif
40 | #endif
41 |
42 | #endif
43 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # QLCommonMark
2 |
3 | ## Introduction
4 |
5 | `QLCommonMark` is a QuickLook generator for [CommonMark](http://commonmark.org/) and Markdown files. It uses [cmark](https://github.com/jgm/cmark) to render the text, and Bootstrap to style it.
6 |
7 | ## Installation
8 |
9 | [Download `QLCommonMark.qlgenerator`](https://github.com/digitalmoksha/QLCommonMark/releases/download/v1.1/QLCommonMark.qlgenerator.zip) and copy it to your `~/Library/QuickLook` or `/Library/QuickLook` folder. If the plugin is not picked up immediately, you may need to run `qlmanage -r` from the Terminal.
10 |
11 | ### Homebrew
12 |
13 | If you have [Homebrew-Cask](https://github.com/caskroom/homebrew-cask) installed, you can install `QLCommonMark` with the following
14 |
15 | `$ brew update`
16 |
17 | `$ brew cask install qlcommonmark`
18 |
19 | and uninstall using
20 |
21 | `$ brew cask uninstall qlcommonmark`
22 |
23 |
24 | ## Inspiration
25 |
26 | This project was inspired by:
27 |
28 | - [ttscoff/MMD-QuickLook: Improved QuickLook generator for MultiMarkdown files](https://github.com/ttscoff/MMD-QuickLook)
29 | - [toland/qlmarkdown: QuickLook generator for Markdown files.](https://github.com/toland/qlmarkdown)
30 |
31 | ## CommonMark Editor for macOS
32 |
33 | `Versatil Markdown` is a CommonMark compliant Markdown editor for macOS, and incorporates `QLCommonMark`. You can check out a free trial on the [Versatil Markdown website](https://versatilapp.com).
--------------------------------------------------------------------------------
/QLCommonMark/GeneratePreviewForURL.m:
--------------------------------------------------------------------------------
1 | #include "shared.h"
2 | #include "common_mark.h"
3 |
4 | OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options);
5 | void CancelPreviewGeneration(void *thisInterface, QLPreviewRequestRef preview);
6 |
7 | /* -----------------------------------------------------------------------------
8 | Generate a preview for file
9 |
10 | This function's job is to create preview for designated file
11 | ----------------------------------------------------------------------------- */
12 |
13 | //-----------------------------------------------------------------------------
14 | OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options)
15 | {
16 | NSURL *nsurl = (__bridge NSURL *)url;
17 |
18 | if (kLogDebug) NSLog(@"generate preview for content type: %@", contentTypeUTI);
19 |
20 | CFDataRef previewData;
21 |
22 | if (CFStringCompare(contentTypeUTI, CFSTR("org.textbundle.package"), 0) == kCFCompareEqualTo)
23 | {
24 | NSString *docPath = [[nsurl path] stringByAppendingPathComponent:@"text.md"];
25 | nsurl = [NSURL fileURLWithPath:docPath];
26 | }
27 | previewData = (__bridge CFDataRef)render_markdown_cmark(nsurl);
28 |
29 | if (previewData)
30 | {
31 | if (kLogDebug) NSLog(@"preview generated");
32 |
33 | CFDictionaryRef properties = (__bridge CFDictionaryRef)[NSDictionary dictionaryWithObject:@"UTF-8" forKey:(NSString *)kQLPreviewPropertyTextEncodingNameKey];
34 | QLPreviewRequestSetDataRepresentation(preview, previewData, kUTTypeHTML, properties);
35 | }
36 |
37 | return noErr;
38 | }
39 |
40 | //-----------------------------------------------------------------------------
41 | void CancelPreviewGeneration(void *thisInterface, QLPreviewRequestRef preview)
42 | {
43 | // Implement only if supported
44 | }
45 |
46 |
47 |
--------------------------------------------------------------------------------
/QLCommonMark/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDocumentTypes
8 |
9 |
10 | CFBundleTypeRole
11 | QLGenerator
12 | LSItemContentTypes
13 |
14 | net.daringfireball.markdown
15 | net.daringfireball
16 | net.multimarkdown.text
17 | org.vim.markdown-file
18 | com.unknown.md
19 | com.foldingtext.FoldingText.document
20 | dyn.ah62d4rv4ge8043a
21 | dyn.ah62d4rv4ge80445e
22 | dyn.ah62d4rv4ge8042pwrrwg875s
23 | dyn.ah62d4rv4ge8045pe
24 |
25 |
26 |
27 | CFBundleExecutable
28 | $(EXECUTABLE_NAME)
29 | CFBundleIdentifier
30 | $(PRODUCT_BUNDLE_IDENTIFIER)
31 | CFBundleInfoDictionaryVersion
32 | 6.0
33 | CFBundleName
34 | $(PRODUCT_NAME)
35 | CFBundleShortVersionString
36 | 1.1
37 | CFBundleVersion
38 | 1.1
39 | CFPlugInDynamicRegisterFunction
40 |
41 | CFPlugInDynamicRegistration
42 | NO
43 | CFPlugInFactories
44 |
45 | CDC20C91-529C-4975-AABD-5BEA2EB3D3D1
46 | QuickLookGeneratorPluginFactory
47 |
48 | CFPlugInTypes
49 |
50 | 5E2D9680-5022-40FA-B806-43349622E5B9
51 |
52 | CDC20C91-529C-4975-AABD-5BEA2EB3D3D1
53 |
54 |
55 | CFPlugInUnloadFunction
56 |
57 | NSHumanReadableCopyright
58 | Copyright © 2017 digitalMoksha. All rights reserved.
59 | QLNeedsToBeRunInMainThread
60 |
61 | QLPreviewHeight
62 | 600
63 | QLPreviewWidth
64 | 800
65 | QLSupportsConcurrentRequests
66 |
67 | QLThumbnailMinimumSize
68 | 16
69 |
70 |
71 |
--------------------------------------------------------------------------------
/QLCommonMark/common_mark.m:
--------------------------------------------------------------------------------
1 | //
2 | // common_mark.m
3 | // CommonMark QuickLook
4 | //
5 | // Created by Brett Walker on 4/12/17.
6 | // Copyright © 2017 digitalMoksha. All rights reserved.
7 | //
8 |
9 | #include "shared.h"
10 | #include "common_mark.h"
11 | #include "cmark/cmark.h"
12 |
13 | // Uses the embedded `cmark` command line client
14 | //-----------------------------------------------------------------------------
15 | NSData *render_markdown_cmark(NSURL *url)
16 | {
17 | if (kLogDebug) NSLog(@"creating preview for file: %@", [url path]);
18 |
19 | NSString *css_dir = @"~/.cmqlstyle.css";
20 | NSString *css = @"";
21 | NSString *md = [NSString stringWithContentsOfFile: url.path encoding: NSUTF8StringEncoding error: NULL];
22 | char *html_c_string = cmark_markdown_to_html([md UTF8String], [md lengthOfBytesUsingEncoding:NSUTF8StringEncoding], CMARK_OPT_DEFAULT);
23 | NSString *html = [[NSString alloc] initWithUTF8String:html_c_string];
24 | free(html_c_string);
25 |
26 | if (kLogDebug) NSLog(@"Converted Data: %@", html);
27 |
28 | if ([[NSFileManager defaultManager] fileExistsAtPath:[css_dir stringByExpandingTildeInPath]])
29 | {
30 | css = [NSString stringWithFormat:@"\n", [NSString stringWithContentsOfFile:[css_dir stringByExpandingTildeInPath] encoding:NSUTF8StringEncoding error:nil]];
31 | if (kLogDebug) NSLog(@"Using styles found in ~/.cmqlstyle.css: %@", css);
32 | }
33 | else
34 | {
35 | NSString *contents = @"";
36 | NSString *bootstrap_path = [NSString stringWithFormat: @"%@/%@/", [[NSBundle bundleWithIdentifier:kPluginBundleId] resourcePath], @"themes/bootstrap/css"];
37 | css = @"";
38 |
39 | if (kLogDebug) NSLog(@"Using internal style");
40 |
41 | contents = [NSString stringWithContentsOfFile:[NSString stringWithFormat: @"%@/%@", bootstrap_path, @"bootstrap.min.css"]
42 | encoding:NSUTF8StringEncoding error:nil];
43 | css = [css stringByAppendingFormat: @"\n", contents];
44 | contents = [NSString stringWithContentsOfFile:[NSString stringWithFormat: @"%@/%@", bootstrap_path, @"bootstrap-theme.min.css"]
45 | encoding:NSUTF8StringEncoding error:nil];
46 | css = [css stringByAppendingFormat: @"\n", contents];
47 | contents = [NSString stringWithContentsOfFile:[NSString stringWithFormat: @"%@/%@", bootstrap_path, @"bootstrap-theme.min.custom.css"]
48 | encoding:NSUTF8StringEncoding error:nil];
49 | css = [css stringByAppendingFormat: @"\n", contents];
50 | contents = [NSString stringWithContentsOfFile:[NSString stringWithFormat: @"%@/%@", bootstrap_path, @"custom.min.css"]
51 | encoding:NSUTF8StringEncoding error:nil];
52 | css = [css stringByAppendingFormat: @"\n", contents];
53 |
54 | }
55 |
56 | html = [NSString stringWithFormat: @"\n"
57 | "\n"
58 | "\n"
59 | " \n"
60 | " %@\n"
61 | " \n"
62 | "\n"
63 | "\n"
64 | " \n"
65 | "
\n"
66 | "
\n"
67 | "%@"
68 | "
\n"
69 | "
\n"
70 | "
\n"
71 | "\n"
72 | "",
73 | css, url, html];
74 |
75 | if (kLogDebug) NSLog(@"Rendered Data: %@", html);
76 |
77 | return [html dataUsingEncoding:NSUTF8StringEncoding];
78 | }
79 |
--------------------------------------------------------------------------------
/QLCommonMark/Resources/themes/bootstrap/css/bootstrap-theme.min.custom.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright 2017 digitalMoksha LLC
3 | */
4 |
5 | /* Override Styles for this Theme */
6 |
7 | h2 {
8 | border-bottom: 1px solid #ccc;
9 | }
10 |
11 | .table tbody {
12 | border-top: 1px solid #ddd;
13 | border-bottom: 1px solid #ddd;
14 | }
15 |
16 | .markdown_note pre {
17 | color:#333;
18 | /*background-color: #fcfcfc;*/
19 | /*border: 1px solid #ddd;*/
20 | border: 1px solid rgba(174, 175, 5, 0.47);
21 | border-radius: 4px;
22 | background-color: rgba(249, 243, 24, 0.06);
23 | margin-top: 10px;
24 | }
25 |
26 | .markdown_note pre[class*="language-"] {
27 | background-color: rgba(249, 243, 24, 0.06);
28 | }
29 |
30 | .markdown_note pre::-webkit-scrollbar {
31 | width: 5px;
32 | height: 5px;
33 | }
34 |
35 | .code_note pre {
36 | background-color: transparent;
37 | border: none;
38 | }
39 |
40 | /* Track */
41 | .markdown_note pre::-webkit-scrollbar-track {
42 | /*-webkit-box-shadow: inset 0 0 1px rgba(0,0,0,0.2); */
43 | -webkit-border-radius: 10px;
44 | border-radius: 10px;
45 | }
46 |
47 | /* Handle */
48 | .markdown_note pre::-webkit-scrollbar-thumb {
49 | -webkit-border-radius: 10px;
50 | border-radius: 10px;
51 | /*background: rgba(51, 122, 183, 0.7);*/
52 | background: rgba(0, 0, 0, 0.2);
53 | /*-webkit-box-shadow: inset 0 0 1px rgba(0,0,0,0.5); */
54 | }
55 | .markdown_note pre:hover::-webkit-scrollbar-thumb {
56 | /*background: rgba(108, 0, 0, 0.7);*/
57 | background: rgba(108, 98, 0, 0.7);
58 | }
59 | .markdown_note pre::-webkit-scrollbar-thumb:window-inactive {
60 | background: rgba(193, 194, 194, 0.3);
61 | }
62 |
63 | .left_note, .right_note {
64 | border: 1px solid #ddd;
65 | -moz-box-shadow: 0 0 11px rgba(139, 139, 139, 0.16);
66 | box-shadow: 0 0 11px rgba(139, 139, 139, 0.16);
67 | }
68 |
69 | .left_note:hover, .right_note:hover,
70 | .note_title:hover + .left_note, .note_title:hover + .right_note {
71 | border: 1px solid rgba(24, 99, 217, 0.3);
72 | -moz-box-shadow: 0 0 11px rgba(9, 103, 234, 0.29);
73 | box-shadow: 0 0 11px rgba(9, 103, 234, 0.29);
74 | }
75 |
76 |
77 | .example {
78 | -moz-box-shadow: inset 0 1px 0px rgba(230, 185, 66, 0.30), inset 0 -1px 0 rgba(230, 185, 66, 0.30);
79 | box-shadow: inset 0 1px 0px rgba(230, 185, 66, 0.30), inset 0 -1px 0 rgba(230, 185, 66, 0.30);
80 | border-top: 1px solid rgba(254, 230, 119, 0.65);
81 | border-bottom: 1px solid rgba(254, 230, 119, 0.65);
82 | background-color: rgba(254, 238, 166, 0.06);
83 | }
84 |
85 | /* from Bootstrap */
86 | @media print {
87 | *,
88 | *:before,
89 | *:after {
90 | /* background: transparent !important;*/
91 | /* color: #000 !important;*/
92 | -webkit-box-shadow: none !important;
93 | box-shadow: none !important;
94 | text-shadow: none !important;
95 | }
96 | /* a,
97 | a:visited {
98 | text-decoration: underline;
99 | }*/
100 | /* a[href]:after {
101 | content: " (" attr(href) ")";
102 | }*/
103 | /* abbr[title]:after {
104 | content: " (" attr(title) ")";
105 | }*/
106 | /* a[href^="#"]:after,
107 | a[href^="javascript:"]:after {
108 | content: "";
109 | }*/
110 | pre,
111 | blockquote {
112 | border: 1px solid #999;
113 | page-break-inside: avoid;
114 | }
115 | thead {
116 | display: table-header-group;
117 | }
118 | tr,
119 | img {
120 | page-break-inside: avoid;
121 | }
122 | img {
123 | max-width: 100% !important;
124 | }
125 | p,
126 | h2,
127 | h3 {
128 | orphans: 3;
129 | widows: 3;
130 | }
131 | h2,
132 | h3 {
133 | page-break-after: avoid;
134 | }
135 | .navbar {
136 | display: none;
137 | }
138 | .btn > .caret,
139 | .dropup > .btn > .caret {
140 | border-top-color: #000 !important;
141 | }
142 | .label {
143 | border: 1px solid #000;
144 | }
145 | .table {
146 | border-collapse: collapse !important;
147 | }
148 | .table td,
149 | .table th {
150 | background-color: #fff !important;
151 | }
152 | .table-bordered th,
153 | .table-bordered td {
154 | border: 1px solid #ddd !important;
155 | }
156 | }
157 |
158 | @media print {
159 | blockquote, pre {
160 | border: none;
161 | border-left: 5px solid #eee;
162 | }
163 | }
164 |
--------------------------------------------------------------------------------
/QLCommonMark/Resources/themes/bootstrap/css/custom.min.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright 2017 digitalMoksha LLC
3 | */
4 |
5 | /* Override Styles for all themes */
6 |
7 | body.multi_note {
8 | background-color: #fbfbfb;
9 | }
10 |
11 | .single_note { margin: 15px; }
12 |
13 | h1 {
14 | font: 28px "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
15 | font-weight: 300;
16 | padding-bottom: 9px;
17 | margin: 30px 0 20px;
18 | /*border-bottom: 1px solid #eee*/
19 | }
20 |
21 | h2 {
22 | font: 22px "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
23 | font-weight: 300;
24 | padding-bottom: 5px;
25 | margin: 25px 0 18px;
26 | }
27 |
28 | h3 {
29 | font: 18px "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
30 | font-weight: 400;
31 | padding-bottom: 9px;
32 | margin: 20px 0 10px;
33 | }
34 |
35 | h4 {
36 | font: 16px "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
37 | font-weight: 500;
38 | padding-bottom: 9px;
39 | margin: 20px 0 10px;
40 | }
41 |
42 |
43 | ul ul, ol ul {
44 | list-style: square;
45 | padding-left: 15px;
46 | }
47 |
48 | ol li, ul li { margin-bottom: 5px; }
49 | li ul { margin-top: 5px; }
50 |
51 | .task_item {
52 | list-style: none;
53 | margin-left: -21px;
54 | }
55 |
56 | li.task_item ul { margin-left: 23px; }
57 | .task_item p { margin-left: 23px; }
58 |
59 | .checkbox label::before, .checkbox label::after { margin-top: 1px; }
60 | .checkbox label { padding-left: 2px; }
61 | .checkbox label::before {
62 | width: 16px;
63 | height: 16px;
64 | }
65 | .checkbox label::after {
66 | width: 15px;
67 | height: 15px;
68 | font-size: 10px;
69 | }
70 |
71 | a.onepassword_login::before {
72 | font: 11px 'FontAwesome';
73 | content: "\f08e";
74 | margin-right: 5px;
75 | }
76 |
77 | a.onepassword_find::before {
78 | font: 11px 'FontAwesome';
79 | content: "\f084";
80 | margin-right: 5px;
81 | }
82 |
83 | a.onepassword_find:hover::before, a.onepassword_login:hover::before {
84 | text-decoration: none;
85 | }
86 |
87 | /* remove border around table head */
88 | .table { width: auto; }
89 | .table thead tr th { border: none; }
90 | .table tbody tr td { border: none; }
91 |
92 | pre code {
93 | word-wrap: normal;
94 | white-space: pre;
95 | }
96 |
97 | dt { font-weight: 500; }
98 |
99 | @media(min-width:568px) {
100 | dl.dl-horizontal {
101 | display: table;
102 | }
103 |
104 | .dl-horizontal dt {
105 | display: table-cell;
106 | text-align: right;
107 | float: none;
108 | width: auto;
109 | padding-left: 20px;
110 | }
111 |
112 |
113 | .dl-horizontal dd {
114 | display: table-cell;
115 | padding-left: 20px;
116 | padding-bottom: 5px;
117 | }
118 |
119 | dl div { display: table-row-group; }
120 |
121 | }
122 |
123 | blockquote {
124 | font-size: 14px;
125 | color: #555;
126 | }
127 |
128 | /*--- Multi Note ---*/
129 |
130 | h4.note_title {
131 | font: 12px "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
132 | font-weight: 400;
133 | padding-bottom: 3px;
134 | margin-bottom: 0;
135 | color: #999;
136 | text-align: left;
137 | padding-top: 3px;
138 | }
139 | h4.note_title a {
140 | color: #999;
141 | }
142 | h4.note_title:hover a {
143 | color: #666;
144 | }
145 |
146 | h4.note_title .note_title_edit {
147 | text-align: right;
148 | float: right;
149 | display: none;
150 | }
151 |
152 | h4.note_title:hover .note_title_edit {
153 | display: inline;
154 | }
155 |
156 | /* when using mult-note, make h1/h2 a little smaller,
157 | otherwise they look too big in the small space */
158 | .multi_note h1 { font-size: 22px; }
159 | .multi_note h2 { font-size: 20px; }
160 | .left_note, .right_note {
161 | border-radius: 3px;
162 | padding: 20px;
163 | margin-top: 0;
164 | margin-bottom: 15px;
165 | /* max-height: 300px;*/
166 | height: 300px;
167 | overflow: hidden;
168 | background-color: white;
169 | }
170 |
171 | .left_note:hover, .right_note:hover {
172 | overflow: auto;
173 | }
174 |
175 | .preview_noscroll .left_note:hover, .preview_noscroll .right_note:hover {
176 | overflow: hidden;
177 | }
178 |
179 | .left_note h1:first-child, .right_note h1:first-child { margin-top: 5px; }
180 | .left_note h2:first-child, .right_note h2:first-child { margin-top: 5px; }
181 |
182 | .multi_note.folder_note, .multi_note.image_note {
183 | display: flex;
184 | justify-content: center;
185 | align-items: center;
186 | }
187 |
188 | .multi_note.folder_note div {
189 | width: 50%;
190 | }
191 | .multi_note.image_note div {
192 | width: 50%;
193 | }
194 | .multi_note.folder_note figcaption {
195 | text-align: center;
196 | }
197 |
198 | .single_note.image_note img {
199 | position: fixed;
200 | top: 50%;
201 | left: 50%;
202 | transform: translate(-50%, -50%);
203 | }
204 |
205 | .example {
206 | margin-bottom: 15px;
207 | margin-top: 15px;
208 | padding-top: 10px;
209 | padding-bottom: 10px;
210 | border-right-style: none;
211 | border-left-style: none;
212 | }
213 |
214 | /*--- make images in tables, and images in general, be respsonsive ---*/
215 | table img, img {
216 | max-width: 100%;
217 | height: auto;
218 | /*display: block; allow images to align horizontally if they are in the
219 | same paragraph. Like the build images on github. */
220 | }
221 |
222 | /*--- any special formatting for a sparkfile ---*/
223 | .spark_file h6 {
224 | color: #777;
225 | font-size: 11px;
226 | text-decoration: underline;
227 | }
228 |
229 | /*--- printing tweaks ---*/
230 | @media print {
231 | /* remove placing the full link text after the anchor */
232 | a[href]:after {
233 | content: none;
234 | }
235 | .left_container, .right_container, pre, blockquote {
236 | page-break-inside: avoid;
237 | break-inside: avoid;
238 | }
239 | }
240 |
--------------------------------------------------------------------------------
/QLCommonMark/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 "CDC20C91-529C-4975-AABD-5BEA2EB3D3D1"
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 |
--------------------------------------------------------------------------------
/QLCommonMark.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 450C002A1EE405500016877C /* cmark_export.h in Headers */ = {isa = PBXBuildFile; fileRef = 450C00261EE405500016877C /* cmark_export.h */; };
11 | 450C002B1EE405500016877C /* cmark_version.h in Headers */ = {isa = PBXBuildFile; fileRef = 450C00271EE405500016877C /* cmark_version.h */; };
12 | 450C002C1EE405500016877C /* cmark.h in Headers */ = {isa = PBXBuildFile; fileRef = 450C00281EE405500016877C /* cmark.h */; };
13 | 450C002D1EE405500016877C /* libcmark.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 450C00291EE405500016877C /* libcmark.a */; };
14 | 453120C21E9E1E1C00D752F5 /* GenerateThumbnailForURL.m in Sources */ = {isa = PBXBuildFile; fileRef = 453120C11E9E1E1C00D752F5 /* GenerateThumbnailForURL.m */; };
15 | 453120C41E9E1E1C00D752F5 /* GeneratePreviewForURL.m in Sources */ = {isa = PBXBuildFile; fileRef = 453120C31E9E1E1C00D752F5 /* GeneratePreviewForURL.m */; };
16 | 453120C61E9E1E1C00D752F5 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 453120C51E9E1E1C00D752F5 /* main.c */; };
17 | 453120D01E9E1F5700D752F5 /* common_mark.h in Headers */ = {isa = PBXBuildFile; fileRef = 453120CE1E9E1F5700D752F5 /* common_mark.h */; };
18 | 453120D31E9E1FD600D752F5 /* common_mark.m in Sources */ = {isa = PBXBuildFile; fileRef = 453120D21E9E1FD600D752F5 /* common_mark.m */; };
19 | 45E7FCBC1E9E4B4800773069 /* themes in Resources */ = {isa = PBXBuildFile; fileRef = 45E7FCBB1E9E4B4800773069 /* themes */; };
20 | /* End PBXBuildFile section */
21 |
22 | /* Begin PBXFileReference section */
23 | 450C00261EE405500016877C /* cmark_export.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cmark_export.h; path = cmark/cmark_export.h; sourceTree = ""; };
24 | 450C00271EE405500016877C /* cmark_version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cmark_version.h; path = cmark/cmark_version.h; sourceTree = ""; };
25 | 450C00281EE405500016877C /* cmark.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cmark.h; path = cmark/cmark.h; sourceTree = ""; };
26 | 450C00291EE405500016877C /* libcmark.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcmark.a; path = cmark/libcmark.a; sourceTree = ""; };
27 | 453120BE1E9E1E1C00D752F5 /* QLCommonMark.qlgenerator */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = QLCommonMark.qlgenerator; sourceTree = BUILT_PRODUCTS_DIR; };
28 | 453120C11E9E1E1C00D752F5 /* GenerateThumbnailForURL.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GenerateThumbnailForURL.m; sourceTree = ""; };
29 | 453120C31E9E1E1C00D752F5 /* GeneratePreviewForURL.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GeneratePreviewForURL.m; sourceTree = ""; };
30 | 453120C51E9E1E1C00D752F5 /* main.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = ""; };
31 | 453120C71E9E1E1C00D752F5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
32 | 453120CE1E9E1F5700D752F5 /* common_mark.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = common_mark.h; sourceTree = ""; };
33 | 453120D21E9E1FD600D752F5 /* common_mark.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = common_mark.m; sourceTree = ""; };
34 | 453120D41E9E218A00D752F5 /* shared.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = shared.h; sourceTree = ""; };
35 | 45E7FCBB1E9E4B4800773069 /* themes */ = {isa = PBXFileReference; lastKnownFileType = folder; name = themes; path = QLCommonMark/Resources/themes; sourceTree = ""; };
36 | /* End PBXFileReference section */
37 |
38 | /* Begin PBXFrameworksBuildPhase section */
39 | 453120BA1E9E1E1C00D752F5 /* Frameworks */ = {
40 | isa = PBXFrameworksBuildPhase;
41 | buildActionMask = 2147483647;
42 | files = (
43 | 450C002D1EE405500016877C /* libcmark.a in Frameworks */,
44 | );
45 | runOnlyForDeploymentPostprocessing = 0;
46 | };
47 | /* End PBXFrameworksBuildPhase section */
48 |
49 | /* Begin PBXGroup section */
50 | 450C00251EE4023B0016877C /* cmark */ = {
51 | isa = PBXGroup;
52 | children = (
53 | 450C00261EE405500016877C /* cmark_export.h */,
54 | 450C00271EE405500016877C /* cmark_version.h */,
55 | 450C00281EE405500016877C /* cmark.h */,
56 | 450C00291EE405500016877C /* libcmark.a */,
57 | );
58 | name = cmark;
59 | sourceTree = "";
60 | };
61 | 453120B41E9E1E1C00D752F5 = {
62 | isa = PBXGroup;
63 | children = (
64 | 453120C01E9E1E1C00D752F5 /* QLCommonMark */,
65 | 453120CD1E9E1F2100D752F5 /* Resources */,
66 | 453120BF1E9E1E1C00D752F5 /* Products */,
67 | );
68 | sourceTree = "";
69 | };
70 | 453120BF1E9E1E1C00D752F5 /* Products */ = {
71 | isa = PBXGroup;
72 | children = (
73 | 453120BE1E9E1E1C00D752F5 /* QLCommonMark.qlgenerator */,
74 | );
75 | name = Products;
76 | sourceTree = "";
77 | };
78 | 453120C01E9E1E1C00D752F5 /* QLCommonMark */ = {
79 | isa = PBXGroup;
80 | children = (
81 | 450C00251EE4023B0016877C /* cmark */,
82 | 453120CE1E9E1F5700D752F5 /* common_mark.h */,
83 | 453120D21E9E1FD600D752F5 /* common_mark.m */,
84 | 453120C11E9E1E1C00D752F5 /* GenerateThumbnailForURL.m */,
85 | 453120C31E9E1E1C00D752F5 /* GeneratePreviewForURL.m */,
86 | 453120C51E9E1E1C00D752F5 /* main.c */,
87 | 453120C71E9E1E1C00D752F5 /* Info.plist */,
88 | 453120D41E9E218A00D752F5 /* shared.h */,
89 | );
90 | path = QLCommonMark;
91 | sourceTree = "";
92 | };
93 | 453120CD1E9E1F2100D752F5 /* Resources */ = {
94 | isa = PBXGroup;
95 | children = (
96 | 45E7FCBB1E9E4B4800773069 /* themes */,
97 | );
98 | name = Resources;
99 | sourceTree = "";
100 | };
101 | /* End PBXGroup section */
102 |
103 | /* Begin PBXHeadersBuildPhase section */
104 | 453120BB1E9E1E1C00D752F5 /* Headers */ = {
105 | isa = PBXHeadersBuildPhase;
106 | buildActionMask = 2147483647;
107 | files = (
108 | 453120D01E9E1F5700D752F5 /* common_mark.h in Headers */,
109 | 450C002A1EE405500016877C /* cmark_export.h in Headers */,
110 | 450C002B1EE405500016877C /* cmark_version.h in Headers */,
111 | 450C002C1EE405500016877C /* cmark.h in Headers */,
112 | );
113 | runOnlyForDeploymentPostprocessing = 0;
114 | };
115 | /* End PBXHeadersBuildPhase section */
116 |
117 | /* Begin PBXNativeTarget section */
118 | 453120BD1E9E1E1C00D752F5 /* QLCommonMark */ = {
119 | isa = PBXNativeTarget;
120 | buildConfigurationList = 453120CA1E9E1E1C00D752F5 /* Build configuration list for PBXNativeTarget "QLCommonMark" */;
121 | buildPhases = (
122 | 453120B91E9E1E1C00D752F5 /* Sources */,
123 | 453120BA1E9E1E1C00D752F5 /* Frameworks */,
124 | 453120BB1E9E1E1C00D752F5 /* Headers */,
125 | 453120BC1E9E1E1C00D752F5 /* Resources */,
126 | );
127 | buildRules = (
128 | );
129 | dependencies = (
130 | );
131 | name = QLCommonMark;
132 | productName = QLCommonMark;
133 | productReference = 453120BE1E9E1E1C00D752F5 /* QLCommonMark.qlgenerator */;
134 | productType = "com.apple.product-type.bundle";
135 | };
136 | /* End PBXNativeTarget section */
137 |
138 | /* Begin PBXProject section */
139 | 453120B51E9E1E1C00D752F5 /* Project object */ = {
140 | isa = PBXProject;
141 | attributes = {
142 | LastUpgradeCheck = 0830;
143 | ORGANIZATIONNAME = digitalMoksha;
144 | TargetAttributes = {
145 | 453120BD1E9E1E1C00D752F5 = {
146 | CreatedOnToolsVersion = 8.3;
147 | DevelopmentTeam = H9GFEU3LQA;
148 | ProvisioningStyle = Automatic;
149 | };
150 | };
151 | };
152 | buildConfigurationList = 453120B81E9E1E1C00D752F5 /* Build configuration list for PBXProject "QLCommonMark" */;
153 | compatibilityVersion = "Xcode 3.2";
154 | developmentRegion = English;
155 | hasScannedForEncodings = 0;
156 | knownRegions = (
157 | en,
158 | );
159 | mainGroup = 453120B41E9E1E1C00D752F5;
160 | productRefGroup = 453120BF1E9E1E1C00D752F5 /* Products */;
161 | projectDirPath = "";
162 | projectRoot = "";
163 | targets = (
164 | 453120BD1E9E1E1C00D752F5 /* QLCommonMark */,
165 | );
166 | };
167 | /* End PBXProject section */
168 |
169 | /* Begin PBXResourcesBuildPhase section */
170 | 453120BC1E9E1E1C00D752F5 /* Resources */ = {
171 | isa = PBXResourcesBuildPhase;
172 | buildActionMask = 2147483647;
173 | files = (
174 | 45E7FCBC1E9E4B4800773069 /* themes in Resources */,
175 | );
176 | runOnlyForDeploymentPostprocessing = 0;
177 | };
178 | /* End PBXResourcesBuildPhase section */
179 |
180 | /* Begin PBXSourcesBuildPhase section */
181 | 453120B91E9E1E1C00D752F5 /* Sources */ = {
182 | isa = PBXSourcesBuildPhase;
183 | buildActionMask = 2147483647;
184 | files = (
185 | 453120C21E9E1E1C00D752F5 /* GenerateThumbnailForURL.m in Sources */,
186 | 453120C41E9E1E1C00D752F5 /* GeneratePreviewForURL.m in Sources */,
187 | 453120C61E9E1E1C00D752F5 /* main.c in Sources */,
188 | 453120D31E9E1FD600D752F5 /* common_mark.m in Sources */,
189 | );
190 | runOnlyForDeploymentPostprocessing = 0;
191 | };
192 | /* End PBXSourcesBuildPhase section */
193 |
194 | /* Begin XCBuildConfiguration section */
195 | 453120C81E9E1E1C00D752F5 /* Debug */ = {
196 | isa = XCBuildConfiguration;
197 | buildSettings = {
198 | ALWAYS_SEARCH_USER_PATHS = NO;
199 | CLANG_ANALYZER_NONNULL = YES;
200 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
201 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
202 | CLANG_CXX_LIBRARY = "libc++";
203 | CLANG_ENABLE_MODULES = YES;
204 | CLANG_ENABLE_OBJC_ARC = YES;
205 | CLANG_WARN_BOOL_CONVERSION = YES;
206 | CLANG_WARN_CONSTANT_CONVERSION = YES;
207 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
208 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
209 | CLANG_WARN_EMPTY_BODY = YES;
210 | CLANG_WARN_ENUM_CONVERSION = YES;
211 | CLANG_WARN_INFINITE_RECURSION = YES;
212 | CLANG_WARN_INT_CONVERSION = YES;
213 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
214 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
215 | CLANG_WARN_UNREACHABLE_CODE = YES;
216 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
217 | CODE_SIGN_IDENTITY = "-";
218 | COPY_PHASE_STRIP = NO;
219 | DEBUG_INFORMATION_FORMAT = dwarf;
220 | ENABLE_STRICT_OBJC_MSGSEND = YES;
221 | ENABLE_TESTABILITY = YES;
222 | GCC_C_LANGUAGE_STANDARD = gnu99;
223 | GCC_DYNAMIC_NO_PIC = NO;
224 | GCC_NO_COMMON_BLOCKS = YES;
225 | GCC_OPTIMIZATION_LEVEL = 0;
226 | GCC_PREPROCESSOR_DEFINITIONS = (
227 | "DEBUG=1",
228 | "$(inherited)",
229 | );
230 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
231 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
232 | GCC_WARN_UNDECLARED_SELECTOR = YES;
233 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
234 | GCC_WARN_UNUSED_FUNCTION = YES;
235 | GCC_WARN_UNUSED_VARIABLE = YES;
236 | MACOSX_DEPLOYMENT_TARGET = 10.12;
237 | MTL_ENABLE_DEBUG_INFO = YES;
238 | ONLY_ACTIVE_ARCH = YES;
239 | SDKROOT = macosx;
240 | };
241 | name = Debug;
242 | };
243 | 453120C91E9E1E1C00D752F5 /* Release */ = {
244 | isa = XCBuildConfiguration;
245 | buildSettings = {
246 | ALWAYS_SEARCH_USER_PATHS = NO;
247 | CLANG_ANALYZER_NONNULL = YES;
248 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
249 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
250 | CLANG_CXX_LIBRARY = "libc++";
251 | CLANG_ENABLE_MODULES = YES;
252 | CLANG_ENABLE_OBJC_ARC = YES;
253 | CLANG_WARN_BOOL_CONVERSION = YES;
254 | CLANG_WARN_CONSTANT_CONVERSION = YES;
255 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
256 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
257 | CLANG_WARN_EMPTY_BODY = YES;
258 | CLANG_WARN_ENUM_CONVERSION = YES;
259 | CLANG_WARN_INFINITE_RECURSION = YES;
260 | CLANG_WARN_INT_CONVERSION = YES;
261 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
262 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
263 | CLANG_WARN_UNREACHABLE_CODE = YES;
264 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
265 | CODE_SIGN_IDENTITY = "-";
266 | COPY_PHASE_STRIP = NO;
267 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
268 | ENABLE_NS_ASSERTIONS = NO;
269 | ENABLE_STRICT_OBJC_MSGSEND = YES;
270 | GCC_C_LANGUAGE_STANDARD = gnu99;
271 | GCC_NO_COMMON_BLOCKS = YES;
272 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
273 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
274 | GCC_WARN_UNDECLARED_SELECTOR = YES;
275 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
276 | GCC_WARN_UNUSED_FUNCTION = YES;
277 | GCC_WARN_UNUSED_VARIABLE = YES;
278 | MACOSX_DEPLOYMENT_TARGET = 10.12;
279 | MTL_ENABLE_DEBUG_INFO = NO;
280 | SDKROOT = macosx;
281 | };
282 | name = Release;
283 | };
284 | 453120CB1E9E1E1C00D752F5 /* Debug */ = {
285 | isa = XCBuildConfiguration;
286 | buildSettings = {
287 | COMBINE_HIDPI_IMAGES = YES;
288 | DEVELOPMENT_TEAM = H9GFEU3LQA;
289 | INFOPLIST_FILE = QLCommonMark/Info.plist;
290 | INSTALL_PATH = /Library/QuickLook;
291 | LIBRARY_SEARCH_PATHS = (
292 | "$(inherited)",
293 | "$(PROJECT_DIR)/QLCommonMark/cmark",
294 | );
295 | MACOSX_DEPLOYMENT_TARGET = 10.11;
296 | PRODUCT_BUNDLE_IDENTIFIER = com.digitalmoksha.QLCommonMark;
297 | PRODUCT_NAME = "$(TARGET_NAME)";
298 | WRAPPER_EXTENSION = qlgenerator;
299 | };
300 | name = Debug;
301 | };
302 | 453120CC1E9E1E1C00D752F5 /* Release */ = {
303 | isa = XCBuildConfiguration;
304 | buildSettings = {
305 | COMBINE_HIDPI_IMAGES = YES;
306 | DEVELOPMENT_TEAM = H9GFEU3LQA;
307 | INFOPLIST_FILE = QLCommonMark/Info.plist;
308 | INSTALL_PATH = /Library/QuickLook;
309 | LIBRARY_SEARCH_PATHS = (
310 | "$(inherited)",
311 | "$(PROJECT_DIR)/QLCommonMark/cmark",
312 | );
313 | MACOSX_DEPLOYMENT_TARGET = 10.11;
314 | PRODUCT_BUNDLE_IDENTIFIER = com.digitalmoksha.QLCommonMark;
315 | PRODUCT_NAME = "$(TARGET_NAME)";
316 | WRAPPER_EXTENSION = qlgenerator;
317 | };
318 | name = Release;
319 | };
320 | /* End XCBuildConfiguration section */
321 |
322 | /* Begin XCConfigurationList section */
323 | 453120B81E9E1E1C00D752F5 /* Build configuration list for PBXProject "QLCommonMark" */ = {
324 | isa = XCConfigurationList;
325 | buildConfigurations = (
326 | 453120C81E9E1E1C00D752F5 /* Debug */,
327 | 453120C91E9E1E1C00D752F5 /* Release */,
328 | );
329 | defaultConfigurationIsVisible = 0;
330 | defaultConfigurationName = Release;
331 | };
332 | 453120CA1E9E1E1C00D752F5 /* Build configuration list for PBXNativeTarget "QLCommonMark" */ = {
333 | isa = XCConfigurationList;
334 | buildConfigurations = (
335 | 453120CB1E9E1E1C00D752F5 /* Debug */,
336 | 453120CC1E9E1E1C00D752F5 /* Release */,
337 | );
338 | defaultConfigurationIsVisible = 0;
339 | defaultConfigurationName = Release;
340 | };
341 | /* End XCConfigurationList section */
342 | };
343 | rootObject = 453120B51E9E1E1C00D752F5 /* Project object */;
344 | }
345 |
--------------------------------------------------------------------------------
/QLCommonMark/cmark/cmark.h:
--------------------------------------------------------------------------------
1 | #ifndef CMARK_H
2 | #define CMARK_H
3 |
4 | #include
5 | #include "cmark_export.h"
6 | #include "cmark_version.h"
7 |
8 | #ifdef __cplusplus
9 | extern "C" {
10 | #endif
11 |
12 | /** # NAME
13 | *
14 | * **cmark** - CommonMark parsing, manipulating, and rendering
15 | */
16 |
17 | /** # DESCRIPTION
18 | *
19 | * ## Simple Interface
20 | */
21 |
22 | /** Convert 'text' (assumed to be a UTF-8 encoded string with length
23 | * 'len') from CommonMark Markdown to HTML, returning a null-terminated,
24 | * UTF-8-encoded string. It is the caller's responsibility
25 | * to free the returned buffer.
26 | */
27 | CMARK_EXPORT
28 | char *cmark_markdown_to_html(const char *text, size_t len, int options);
29 |
30 | /** ## Node Structure
31 | */
32 |
33 | typedef enum {
34 | /* Error status */
35 | CMARK_NODE_NONE,
36 |
37 | /* Block */
38 | CMARK_NODE_DOCUMENT,
39 | CMARK_NODE_BLOCK_QUOTE,
40 | CMARK_NODE_LIST,
41 | CMARK_NODE_ITEM,
42 | CMARK_NODE_CODE_BLOCK,
43 | CMARK_NODE_HTML_BLOCK,
44 | CMARK_NODE_CUSTOM_BLOCK,
45 | CMARK_NODE_PARAGRAPH,
46 | CMARK_NODE_HEADING,
47 | CMARK_NODE_THEMATIC_BREAK,
48 |
49 | CMARK_NODE_FIRST_BLOCK = CMARK_NODE_DOCUMENT,
50 | CMARK_NODE_LAST_BLOCK = CMARK_NODE_THEMATIC_BREAK,
51 |
52 | /* Inline */
53 | CMARK_NODE_TEXT,
54 | CMARK_NODE_SOFTBREAK,
55 | CMARK_NODE_LINEBREAK,
56 | CMARK_NODE_CODE,
57 | CMARK_NODE_HTML_INLINE,
58 | CMARK_NODE_CUSTOM_INLINE,
59 | CMARK_NODE_EMPH,
60 | CMARK_NODE_STRONG,
61 | CMARK_NODE_LINK,
62 | CMARK_NODE_IMAGE,
63 |
64 | CMARK_NODE_FIRST_INLINE = CMARK_NODE_TEXT,
65 | CMARK_NODE_LAST_INLINE = CMARK_NODE_IMAGE,
66 | } cmark_node_type;
67 |
68 | /* For backwards compatibility: */
69 | #define CMARK_NODE_HEADER CMARK_NODE_HEADING
70 | #define CMARK_NODE_HRULE CMARK_NODE_THEMATIC_BREAK
71 | #define CMARK_NODE_HTML CMARK_NODE_HTML_BLOCK
72 | #define CMARK_NODE_INLINE_HTML CMARK_NODE_HTML_INLINE
73 |
74 | typedef enum {
75 | CMARK_NO_LIST,
76 | CMARK_BULLET_LIST,
77 | CMARK_ORDERED_LIST
78 | } cmark_list_type;
79 |
80 | typedef enum {
81 | CMARK_NO_DELIM,
82 | CMARK_PERIOD_DELIM,
83 | CMARK_PAREN_DELIM
84 | } cmark_delim_type;
85 |
86 | typedef struct cmark_node cmark_node;
87 | typedef struct cmark_parser cmark_parser;
88 | typedef struct cmark_iter cmark_iter;
89 |
90 | /**
91 | * ## Custom memory allocator support
92 | */
93 |
94 | /** Defines the memory allocation functions to be used by CMark
95 | * when parsing and allocating a document tree
96 | */
97 | typedef struct cmark_mem {
98 | void *(*calloc)(size_t, size_t);
99 | void *(*realloc)(void *, size_t);
100 | void (*free)(void *);
101 | } cmark_mem;
102 |
103 | /**
104 | * ## Creating and Destroying Nodes
105 | */
106 |
107 | /** Creates a new node of type 'type'. Note that the node may have
108 | * other required properties, which it is the caller's responsibility
109 | * to assign.
110 | */
111 | CMARK_EXPORT cmark_node *cmark_node_new(cmark_node_type type);
112 |
113 | /** Same as `cmark_node_new`, but explicitly listing the memory
114 | * allocator used to allocate the node. Note: be sure to use the same
115 | * allocator for every node in a tree, or bad things can happen.
116 | */
117 | CMARK_EXPORT cmark_node *cmark_node_new_with_mem(cmark_node_type type,
118 | cmark_mem *mem);
119 |
120 | /** Frees the memory allocated for a node and any children.
121 | */
122 | CMARK_EXPORT void cmark_node_free(cmark_node *node);
123 |
124 | /**
125 | * ## Tree Traversal
126 | */
127 |
128 | /** Returns the next node in the sequence after 'node', or NULL if
129 | * there is none.
130 | */
131 | CMARK_EXPORT cmark_node *cmark_node_next(cmark_node *node);
132 |
133 | /** Returns the previous node in the sequence after 'node', or NULL if
134 | * there is none.
135 | */
136 | CMARK_EXPORT cmark_node *cmark_node_previous(cmark_node *node);
137 |
138 | /** Returns the parent of 'node', or NULL if there is none.
139 | */
140 | CMARK_EXPORT cmark_node *cmark_node_parent(cmark_node *node);
141 |
142 | /** Returns the first child of 'node', or NULL if 'node' has no children.
143 | */
144 | CMARK_EXPORT cmark_node *cmark_node_first_child(cmark_node *node);
145 |
146 | /** Returns the last child of 'node', or NULL if 'node' has no children.
147 | */
148 | CMARK_EXPORT cmark_node *cmark_node_last_child(cmark_node *node);
149 |
150 | /**
151 | * ## Iterator
152 | *
153 | * An iterator will walk through a tree of nodes, starting from a root
154 | * node, returning one node at a time, together with information about
155 | * whether the node is being entered or exited. The iterator will
156 | * first descend to a child node, if there is one. When there is no
157 | * child, the iterator will go to the next sibling. When there is no
158 | * next sibling, the iterator will return to the parent (but with
159 | * a 'cmark_event_type' of `CMARK_EVENT_EXIT`). The iterator will
160 | * return `CMARK_EVENT_DONE` when it reaches the root node again.
161 | * One natural application is an HTML renderer, where an `ENTER` event
162 | * outputs an open tag and an `EXIT` event outputs a close tag.
163 | * An iterator might also be used to transform an AST in some systematic
164 | * way, for example, turning all level-3 headings into regular paragraphs.
165 | *
166 | * void
167 | * usage_example(cmark_node *root) {
168 | * cmark_event_type ev_type;
169 | * cmark_iter *iter = cmark_iter_new(root);
170 | *
171 | * while ((ev_type = cmark_iter_next(iter)) != CMARK_EVENT_DONE) {
172 | * cmark_node *cur = cmark_iter_get_node(iter);
173 | * // Do something with `cur` and `ev_type`
174 | * }
175 | *
176 | * cmark_iter_free(iter);
177 | * }
178 | *
179 | * Iterators will never return `EXIT` events for leaf nodes, which are nodes
180 | * of type:
181 | *
182 | * * CMARK_NODE_HTML_BLOCK
183 | * * CMARK_NODE_THEMATIC_BREAK
184 | * * CMARK_NODE_CODE_BLOCK
185 | * * CMARK_NODE_TEXT
186 | * * CMARK_NODE_SOFTBREAK
187 | * * CMARK_NODE_LINEBREAK
188 | * * CMARK_NODE_CODE
189 | * * CMARK_NODE_HTML_INLINE
190 | *
191 | * Nodes must only be modified after an `EXIT` event, or an `ENTER` event for
192 | * leaf nodes.
193 | */
194 |
195 | typedef enum {
196 | CMARK_EVENT_NONE,
197 | CMARK_EVENT_DONE,
198 | CMARK_EVENT_ENTER,
199 | CMARK_EVENT_EXIT
200 | } cmark_event_type;
201 |
202 | /** Creates a new iterator starting at 'root'. The current node and event
203 | * type are undefined until 'cmark_iter_next' is called for the first time.
204 | * The memory allocated for the iterator should be released using
205 | * 'cmark_iter_free' when it is no longer needed.
206 | */
207 | CMARK_EXPORT
208 | cmark_iter *cmark_iter_new(cmark_node *root);
209 |
210 | /** Frees the memory allocated for an iterator.
211 | */
212 | CMARK_EXPORT
213 | void cmark_iter_free(cmark_iter *iter);
214 |
215 | /** Advances to the next node and returns the event type (`CMARK_EVENT_ENTER`,
216 | * `CMARK_EVENT_EXIT` or `CMARK_EVENT_DONE`).
217 | */
218 | CMARK_EXPORT
219 | cmark_event_type cmark_iter_next(cmark_iter *iter);
220 |
221 | /** Returns the current node.
222 | */
223 | CMARK_EXPORT
224 | cmark_node *cmark_iter_get_node(cmark_iter *iter);
225 |
226 | /** Returns the current event type.
227 | */
228 | CMARK_EXPORT
229 | cmark_event_type cmark_iter_get_event_type(cmark_iter *iter);
230 |
231 | /** Returns the root node.
232 | */
233 | CMARK_EXPORT
234 | cmark_node *cmark_iter_get_root(cmark_iter *iter);
235 |
236 | /** Resets the iterator so that the current node is 'current' and
237 | * the event type is 'event_type'. The new current node must be a
238 | * descendant of the root node or the root node itself.
239 | */
240 | CMARK_EXPORT
241 | void cmark_iter_reset(cmark_iter *iter, cmark_node *current,
242 | cmark_event_type event_type);
243 |
244 | /**
245 | * ## Accessors
246 | */
247 |
248 | /** Returns the user data of 'node'.
249 | */
250 | CMARK_EXPORT void *cmark_node_get_user_data(cmark_node *node);
251 |
252 | /** Sets arbitrary user data for 'node'. Returns 1 on success,
253 | * 0 on failure.
254 | */
255 | CMARK_EXPORT int cmark_node_set_user_data(cmark_node *node, void *user_data);
256 |
257 | /** Returns the type of 'node', or `CMARK_NODE_NONE` on error.
258 | */
259 | CMARK_EXPORT cmark_node_type cmark_node_get_type(cmark_node *node);
260 |
261 | /** Like 'cmark_node_get_type', but returns a string representation
262 | of the type, or `""`.
263 | */
264 | CMARK_EXPORT
265 | const char *cmark_node_get_type_string(cmark_node *node);
266 |
267 | /** Returns the string contents of 'node', or an empty
268 | string if none is set.
269 | */
270 | CMARK_EXPORT const char *cmark_node_get_literal(cmark_node *node);
271 |
272 | /** Sets the string contents of 'node'. Returns 1 on success,
273 | * 0 on failure.
274 | */
275 | CMARK_EXPORT int cmark_node_set_literal(cmark_node *node, const char *content);
276 |
277 | /** Returns the heading level of 'node', or 0 if 'node' is not a heading.
278 | */
279 | CMARK_EXPORT int cmark_node_get_heading_level(cmark_node *node);
280 |
281 | /* For backwards compatibility */
282 | #define cmark_node_get_header_level cmark_node_get_heading_level
283 | #define cmark_node_set_header_level cmark_node_set_heading_level
284 |
285 | /** Sets the heading level of 'node', returning 1 on success and 0 on error.
286 | */
287 | CMARK_EXPORT int cmark_node_set_heading_level(cmark_node *node, int level);
288 |
289 | /** Returns the list type of 'node', or `CMARK_NO_LIST` if 'node'
290 | * is not a list.
291 | */
292 | CMARK_EXPORT cmark_list_type cmark_node_get_list_type(cmark_node *node);
293 |
294 | /** Sets the list type of 'node', returning 1 on success and 0 on error.
295 | */
296 | CMARK_EXPORT int cmark_node_set_list_type(cmark_node *node,
297 | cmark_list_type type);
298 |
299 | /** Returns the list delimiter type of 'node', or `CMARK_NO_DELIM` if 'node'
300 | * is not a list.
301 | */
302 | CMARK_EXPORT cmark_delim_type cmark_node_get_list_delim(cmark_node *node);
303 |
304 | /** Sets the list delimiter type of 'node', returning 1 on success and 0
305 | * on error.
306 | */
307 | CMARK_EXPORT int cmark_node_set_list_delim(cmark_node *node,
308 | cmark_delim_type delim);
309 |
310 | /** Returns starting number of 'node', if it is an ordered list, otherwise 0.
311 | */
312 | CMARK_EXPORT int cmark_node_get_list_start(cmark_node *node);
313 |
314 | /** Sets starting number of 'node', if it is an ordered list. Returns 1
315 | * on success, 0 on failure.
316 | */
317 | CMARK_EXPORT int cmark_node_set_list_start(cmark_node *node, int start);
318 |
319 | /** Returns 1 if 'node' is a tight list, 0 otherwise.
320 | */
321 | CMARK_EXPORT int cmark_node_get_list_tight(cmark_node *node);
322 |
323 | /** Sets the "tightness" of a list. Returns 1 on success, 0 on failure.
324 | */
325 | CMARK_EXPORT int cmark_node_set_list_tight(cmark_node *node, int tight);
326 |
327 | /** Returns the info string from a fenced code block.
328 | */
329 | CMARK_EXPORT const char *cmark_node_get_fence_info(cmark_node *node);
330 |
331 | /** Sets the info string in a fenced code block, returning 1 on
332 | * success and 0 on failure.
333 | */
334 | CMARK_EXPORT int cmark_node_set_fence_info(cmark_node *node, const char *info);
335 |
336 | /** Returns the URL of a link or image 'node', or an empty string
337 | if no URL is set.
338 | */
339 | CMARK_EXPORT const char *cmark_node_get_url(cmark_node *node);
340 |
341 | /** Sets the URL of a link or image 'node'. Returns 1 on success,
342 | * 0 on failure.
343 | */
344 | CMARK_EXPORT int cmark_node_set_url(cmark_node *node, const char *url);
345 |
346 | /** Returns the title of a link or image 'node', or an empty
347 | string if no title is set.
348 | */
349 | CMARK_EXPORT const char *cmark_node_get_title(cmark_node *node);
350 |
351 | /** Sets the title of a link or image 'node'. Returns 1 on success,
352 | * 0 on failure.
353 | */
354 | CMARK_EXPORT int cmark_node_set_title(cmark_node *node, const char *title);
355 |
356 | /** Returns the literal "on enter" text for a custom 'node', or
357 | an empty string if no on_enter is set.
358 | */
359 | CMARK_EXPORT const char *cmark_node_get_on_enter(cmark_node *node);
360 |
361 | /** Sets the literal text to render "on enter" for a custom 'node'.
362 | Any children of the node will be rendered after this text.
363 | Returns 1 on success 0 on failure.
364 | */
365 | CMARK_EXPORT int cmark_node_set_on_enter(cmark_node *node,
366 | const char *on_enter);
367 |
368 | /** Returns the literal "on exit" text for a custom 'node', or
369 | an empty string if no on_exit is set.
370 | */
371 | CMARK_EXPORT const char *cmark_node_get_on_exit(cmark_node *node);
372 |
373 | /** Sets the literal text to render "on exit" for a custom 'node'.
374 | Any children of the node will be rendered before this text.
375 | Returns 1 on success 0 on failure.
376 | */
377 | CMARK_EXPORT int cmark_node_set_on_exit(cmark_node *node, const char *on_exit);
378 |
379 | /** Returns the line on which 'node' begins.
380 | */
381 | CMARK_EXPORT int cmark_node_get_start_line(cmark_node *node);
382 |
383 | /** Returns the column at which 'node' begins.
384 | */
385 | CMARK_EXPORT int cmark_node_get_start_column(cmark_node *node);
386 |
387 | /** Returns the line on which 'node' ends.
388 | */
389 | CMARK_EXPORT int cmark_node_get_end_line(cmark_node *node);
390 |
391 | /** Returns the column at which 'node' ends.
392 | */
393 | CMARK_EXPORT int cmark_node_get_end_column(cmark_node *node);
394 |
395 | /**
396 | * ## Tree Manipulation
397 | */
398 |
399 | /** Unlinks a 'node', removing it from the tree, but not freeing its
400 | * memory. (Use 'cmark_node_free' for that.)
401 | */
402 | CMARK_EXPORT void cmark_node_unlink(cmark_node *node);
403 |
404 | /** Inserts 'sibling' before 'node'. Returns 1 on success, 0 on failure.
405 | */
406 | CMARK_EXPORT int cmark_node_insert_before(cmark_node *node,
407 | cmark_node *sibling);
408 |
409 | /** Inserts 'sibling' after 'node'. Returns 1 on success, 0 on failure.
410 | */
411 | CMARK_EXPORT int cmark_node_insert_after(cmark_node *node, cmark_node *sibling);
412 |
413 | /** Replaces 'oldnode' with 'newnode' and unlinks 'oldnode' (but does
414 | * not free its memory).
415 | * Returns 1 on success, 0 on failure.
416 | */
417 | CMARK_EXPORT int cmark_node_replace(cmark_node *oldnode, cmark_node *newnode);
418 |
419 | /** Adds 'child' to the beginning of the children of 'node'.
420 | * Returns 1 on success, 0 on failure.
421 | */
422 | CMARK_EXPORT int cmark_node_prepend_child(cmark_node *node, cmark_node *child);
423 |
424 | /** Adds 'child' to the end of the children of 'node'.
425 | * Returns 1 on success, 0 on failure.
426 | */
427 | CMARK_EXPORT int cmark_node_append_child(cmark_node *node, cmark_node *child);
428 |
429 | /** Consolidates adjacent text nodes.
430 | */
431 | CMARK_EXPORT void cmark_consolidate_text_nodes(cmark_node *root);
432 |
433 | /**
434 | * ## Parsing
435 | *
436 | * Simple interface:
437 | *
438 | * cmark_node *document = cmark_parse_document("Hello *world*", 13,
439 | * CMARK_OPT_DEFAULT);
440 | *
441 | * Streaming interface:
442 | *
443 | * cmark_parser *parser = cmark_parser_new(CMARK_OPT_DEFAULT);
444 | * FILE *fp = fopen("myfile.md", "rb");
445 | * while ((bytes = fread(buffer, 1, sizeof(buffer), fp)) > 0) {
446 | * cmark_parser_feed(parser, buffer, bytes);
447 | * if (bytes < sizeof(buffer)) {
448 | * break;
449 | * }
450 | * }
451 | * document = cmark_parser_finish(parser);
452 | * cmark_parser_free(parser);
453 | */
454 |
455 | /** Creates a new parser object.
456 | */
457 | CMARK_EXPORT
458 | cmark_parser *cmark_parser_new(int options);
459 |
460 | /** Creates a new parser object with the given memory allocator
461 | */
462 | CMARK_EXPORT
463 | cmark_parser *cmark_parser_new_with_mem(int options, cmark_mem *mem);
464 |
465 | /** Frees memory allocated for a parser object.
466 | */
467 | CMARK_EXPORT
468 | void cmark_parser_free(cmark_parser *parser);
469 |
470 | /** Feeds a string of length 'len' to 'parser'.
471 | */
472 | CMARK_EXPORT
473 | void cmark_parser_feed(cmark_parser *parser, const char *buffer, size_t len);
474 |
475 | /** Finish parsing and return a pointer to a tree of nodes.
476 | */
477 | CMARK_EXPORT
478 | cmark_node *cmark_parser_finish(cmark_parser *parser);
479 |
480 | /** Parse a CommonMark document in 'buffer' of length 'len'.
481 | * Returns a pointer to a tree of nodes. The memory allocated for
482 | * the node tree should be released using 'cmark_node_free'
483 | * when it is no longer needed.
484 | */
485 | CMARK_EXPORT
486 | cmark_node *cmark_parse_document(const char *buffer, size_t len, int options);
487 |
488 | /** Parse a CommonMark document in file 'f', returning a pointer to
489 | * a tree of nodes. The memory allocated for the node tree should be
490 | * released using 'cmark_node_free' when it is no longer needed.
491 | */
492 | CMARK_EXPORT
493 | cmark_node *cmark_parse_file(FILE *f, int options);
494 |
495 | /**
496 | * ## Rendering
497 | */
498 |
499 | /** Render a 'node' tree as XML. It is the caller's responsibility
500 | * to free the returned buffer.
501 | */
502 | CMARK_EXPORT
503 | char *cmark_render_xml(cmark_node *root, int options);
504 |
505 | /** Render a 'node' tree as an HTML fragment. It is up to the user
506 | * to add an appropriate header and footer. It is the caller's
507 | * responsibility to free the returned buffer.
508 | */
509 | CMARK_EXPORT
510 | char *cmark_render_html(cmark_node *root, int options);
511 |
512 | /** Render a 'node' tree as a groff man page, without the header.
513 | * It is the caller's responsibility to free the returned buffer.
514 | */
515 | CMARK_EXPORT
516 | char *cmark_render_man(cmark_node *root, int options, int width);
517 |
518 | /** Render a 'node' tree as a commonmark document.
519 | * It is the caller's responsibility to free the returned buffer.
520 | */
521 | CMARK_EXPORT
522 | char *cmark_render_commonmark(cmark_node *root, int options, int width);
523 |
524 | /** Render a 'node' tree as a LaTeX document.
525 | * It is the caller's responsibility to free the returned buffer.
526 | */
527 | CMARK_EXPORT
528 | char *cmark_render_latex(cmark_node *root, int options, int width);
529 |
530 | /**
531 | * ## Options
532 | */
533 |
534 | /** Default options.
535 | */
536 | #define CMARK_OPT_DEFAULT 0
537 |
538 | /**
539 | * ### Options affecting rendering
540 | */
541 |
542 | /** Include a `data-sourcepos` attribute on all block elements.
543 | */
544 | #define CMARK_OPT_SOURCEPOS (1 << 1)
545 |
546 | /** Render `softbreak` elements as hard line breaks.
547 | */
548 | #define CMARK_OPT_HARDBREAKS (1 << 2)
549 |
550 | /** Suppress raw HTML and unsafe links (`javascript:`, `vbscript:`,
551 | * `file:`, and `data:`, except for `image/png`, `image/gif`,
552 | * `image/jpeg`, or `image/webp` mime types). Raw HTML is replaced
553 | * by a placeholder HTML comment. Unsafe links are replaced by
554 | * empty strings.
555 | */
556 | #define CMARK_OPT_SAFE (1 << 3)
557 |
558 | /** Render `softbreak` elements as spaces.
559 | */
560 | #define CMARK_OPT_NOBREAKS (1 << 4)
561 |
562 | /**
563 | * ### Options affecting parsing
564 | */
565 |
566 | /** Normalize tree by consolidating adjacent text nodes.
567 | */
568 | #define CMARK_OPT_NORMALIZE (1 << 8)
569 |
570 | /** Validate UTF-8 in the input before parsing, replacing illegal
571 | * sequences with the replacement character U+FFFD.
572 | */
573 | #define CMARK_OPT_VALIDATE_UTF8 (1 << 9)
574 |
575 | /** Convert straight quotes to curly, --- to em dashes, -- to en dashes.
576 | */
577 | #define CMARK_OPT_SMART (1 << 10)
578 |
579 | /**
580 | * ## Version information
581 | */
582 |
583 | /** The library version as integer for runtime checks. Also available as
584 | * macro CMARK_VERSION for compile time checks.
585 | *
586 | * * Bits 16-23 contain the major version.
587 | * * Bits 8-15 contain the minor version.
588 | * * Bits 0-7 contain the patchlevel.
589 | *
590 | * In hexadecimal format, the number 0x010203 represents version 1.2.3.
591 | */
592 | CMARK_EXPORT
593 | int cmark_version(void);
594 |
595 | /** The library version string for runtime checks. Also available as
596 | * macro CMARK_VERSION_STRING for compile time checks.
597 | */
598 | CMARK_EXPORT
599 | const char *cmark_version_string(void);
600 |
601 | /** # AUTHORS
602 | *
603 | * John MacFarlane, Vicent Marti, Kārlis Gaņģis, Nick Wellnhofer.
604 | */
605 |
606 | #ifndef CMARK_NO_SHORT_NAMES
607 | #define NODE_DOCUMENT CMARK_NODE_DOCUMENT
608 | #define NODE_BLOCK_QUOTE CMARK_NODE_BLOCK_QUOTE
609 | #define NODE_LIST CMARK_NODE_LIST
610 | #define NODE_ITEM CMARK_NODE_ITEM
611 | #define NODE_CODE_BLOCK CMARK_NODE_CODE_BLOCK
612 | #define NODE_HTML_BLOCK CMARK_NODE_HTML_BLOCK
613 | #define NODE_CUSTOM_BLOCK CMARK_NODE_CUSTOM_BLOCK
614 | #define NODE_PARAGRAPH CMARK_NODE_PARAGRAPH
615 | #define NODE_HEADING CMARK_NODE_HEADING
616 | #define NODE_HEADER CMARK_NODE_HEADER
617 | #define NODE_THEMATIC_BREAK CMARK_NODE_THEMATIC_BREAK
618 | #define NODE_HRULE CMARK_NODE_HRULE
619 | #define NODE_TEXT CMARK_NODE_TEXT
620 | #define NODE_SOFTBREAK CMARK_NODE_SOFTBREAK
621 | #define NODE_LINEBREAK CMARK_NODE_LINEBREAK
622 | #define NODE_CODE CMARK_NODE_CODE
623 | #define NODE_HTML_INLINE CMARK_NODE_HTML_INLINE
624 | #define NODE_CUSTOM_INLINE CMARK_NODE_CUSTOM_INLINE
625 | #define NODE_EMPH CMARK_NODE_EMPH
626 | #define NODE_STRONG CMARK_NODE_STRONG
627 | #define NODE_LINK CMARK_NODE_LINK
628 | #define NODE_IMAGE CMARK_NODE_IMAGE
629 | #define BULLET_LIST CMARK_BULLET_LIST
630 | #define ORDERED_LIST CMARK_ORDERED_LIST
631 | #define PERIOD_DELIM CMARK_PERIOD_DELIM
632 | #define PAREN_DELIM CMARK_PAREN_DELIM
633 | #endif
634 |
635 | #ifdef __cplusplus
636 | }
637 | #endif
638 |
639 | #endif
640 |
--------------------------------------------------------------------------------
/QLCommonMark/Resources/themes/bootstrap/css/bootstrap-theme.min.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Bootstrap v3.3.5 (http://getbootstrap.com)
3 | * Copyright 2011-2016 Twitter, Inc.
4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5 | */
6 |
7 | /*!
8 | * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=15e9b69277db8de56bdf134dc0ae926a)
9 | * Config saved to config.json and https://gist.github.com/15e9b69277db8de56bdf134dc0ae926a
10 | *//*!
11 | * Bootstrap v3.3.6 (http://getbootstrap.com)
12 | * Copyright 2011-2015 Twitter, Inc.
13 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
14 | */.btn-default,.btn-primary,.btn-success,.btn-info,.btn-warning,.btn-danger{text-shadow:0 -1px 0 rgba(0,0,0,0.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.15),0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.15),0 1px 1px rgba(0,0,0,0.075)}.btn-default:active,.btn-primary:active,.btn-success:active,.btn-info:active,.btn-warning:active,.btn-danger:active,.btn-default.active,.btn-primary.active,.btn-success.active,.btn-info.active,.btn-warning.active,.btn-danger.active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn-default.disabled,.btn-primary.disabled,.btn-success.disabled,.btn-info.disabled,.btn-warning.disabled,.btn-danger.disabled,.btn-default[disabled],.btn-primary[disabled],.btn-success[disabled],.btn-info[disabled],.btn-warning[disabled],.btn-danger[disabled],fieldset[disabled] .btn-default,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-success,fieldset[disabled] .btn-info,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-danger{-webkit-box-shadow:none;box-shadow:none}.btn-default .badge,.btn-primary .badge,.btn-success .badge,.btn-info .badge,.btn-warning .badge,.btn-danger .badge{text-shadow:none}.btn:active,.btn.active{background-image:none}.btn-default{background-image:-webkit-linear-gradient(top, #fff 0, #e0e0e0 100%);background-image:-o-linear-gradient(top, #fff 0, #e0e0e0 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), to(#e0e0e0));background-image:linear-gradient(to bottom, #fff 0, #e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background-repeat:repeat-x;border-color:#dbdbdb;text-shadow:0 1px 0 #fff;border-color:#ccc}.btn-default:hover,.btn-default:focus{background-color:#e0e0e0;background-position:0 -15px}.btn-default:active,.btn-default.active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled.focus,.btn-default[disabled].focus,fieldset[disabled] .btn-default.focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top, #337ab7 0, #265a88 100%);background-image:-o-linear-gradient(top, #337ab7 0, #265a88 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #337ab7), to(#265a88));background-image:linear-gradient(to bottom, #337ab7 0, #265a88 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background-repeat:repeat-x;border-color:#245580}.btn-primary:hover,.btn-primary:focus{background-color:#265a88;background-position:0 -15px}.btn-primary:active,.btn-primary.active{background-color:#265a88;border-color:#245580}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled.focus,.btn-primary[disabled].focus,fieldset[disabled] .btn-primary.focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#265a88;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top, #5cb85c 0, #419641 100%);background-image:-o-linear-gradient(top, #5cb85c 0, #419641 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #5cb85c), to(#419641));background-image:linear-gradient(to bottom, #5cb85c 0, #419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:hover,.btn-success:focus{background-color:#419641;background-position:0 -15px}.btn-success:active,.btn-success.active{background-color:#419641;border-color:#3e8f3e}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled.focus,.btn-success[disabled].focus,fieldset[disabled] .btn-success.focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top, #5bc0de 0, #2aabd2 100%);background-image:-o-linear-gradient(top, #5bc0de 0, #2aabd2 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #5bc0de), to(#2aabd2));background-image:linear-gradient(to bottom, #5bc0de 0, #2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:hover,.btn-info:focus{background-color:#2aabd2;background-position:0 -15px}.btn-info:active,.btn-info.active{background-color:#2aabd2;border-color:#28a4c9}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled.focus,.btn-info[disabled].focus,fieldset[disabled] .btn-info.focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top, #f0ad4e 0, #eb9316 100%);background-image:-o-linear-gradient(top, #f0ad4e 0, #eb9316 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #f0ad4e), to(#eb9316));background-image:linear-gradient(to bottom, #f0ad4e 0, #eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:hover,.btn-warning:focus{background-color:#eb9316;background-position:0 -15px}.btn-warning:active,.btn-warning.active{background-color:#eb9316;border-color:#e38d13}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled.focus,.btn-warning[disabled].focus,fieldset[disabled] .btn-warning.focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top, #d9534f 0, #c12e2a 100%);background-image:-o-linear-gradient(top, #d9534f 0, #c12e2a 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #d9534f), to(#c12e2a));background-image:linear-gradient(to bottom, #d9534f 0, #c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:hover,.btn-danger:focus{background-color:#c12e2a;background-position:0 -15px}.btn-danger:active,.btn-danger.active{background-color:#c12e2a;border-color:#b92c28}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled.focus,.btn-danger[disabled].focus,fieldset[disabled] .btn-danger.focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#c12e2a;background-image:none}.thumbnail,.img-thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.075);box-shadow:0 1px 2px rgba(0,0,0,0.075)}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{background-image:-webkit-linear-gradient(top, #f5f5f5 0, #e8e8e8 100%);background-image:-o-linear-gradient(top, #f5f5f5 0, #e8e8e8 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #f5f5f5), to(#e8e8e8));background-image:linear-gradient(to bottom, #f5f5f5 0, #e8e8e8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-color:#e8e8e8}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{background-image:-webkit-linear-gradient(top, #337ab7 0, #2e6da4 100%);background-image:-o-linear-gradient(top, #337ab7 0, #2e6da4 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #337ab7), to(#2e6da4));background-image:linear-gradient(to bottom, #337ab7 0, #2e6da4 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-color:#2e6da4}.navbar-default{background-image:-webkit-linear-gradient(top, #fff 0, #f8f8f8 100%);background-image:-o-linear-gradient(top, #fff 0, #f8f8f8 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), to(#f8f8f8));background-image:linear-gradient(to bottom, #fff 0, #f8f8f8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.15),0 1px 5px rgba(0,0,0,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.15),0 1px 5px rgba(0,0,0,0.075)}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top, #dbdbdb 0, #e2e2e2 100%);background-image:-o-linear-gradient(top, #dbdbdb 0, #e2e2e2 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #dbdbdb), to(#e2e2e2));background-image:linear-gradient(to bottom, #dbdbdb 0, #e2e2e2 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,0.075);box-shadow:inset 0 3px 9px rgba(0,0,0,0.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,0.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top, #3c3c3c 0, #222 100%);background-image:-o-linear-gradient(top, #3c3c3c 0, #222 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #3c3c3c), to(#222));background-image:linear-gradient(to bottom, #3c3c3c 0, #222 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);border-radius:4px}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top, #080808 0, #0f0f0f 100%);background-image:-o-linear-gradient(top, #080808 0, #0f0f0f 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #080808), to(#0f0f0f));background-image:linear-gradient(to bottom, #080808 0, #0f0f0f 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,0.25);box-shadow:inset 0 3px 9px rgba(0,0,0,0.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.navbar-static-top,.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}@media (max-width:767px){.navbar .navbar-nav .open .dropdown-menu>.active>a,.navbar .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-image:-webkit-linear-gradient(top, #337ab7 0, #2e6da4 100%);background-image:-o-linear-gradient(top, #337ab7 0, #2e6da4 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #337ab7), to(#2e6da4));background-image:linear-gradient(to bottom, #337ab7 0, #2e6da4 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0)}}.alert{text-shadow:0 1px 0 rgba(255,255,255,0.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.25),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.25),0 1px 2px rgba(0,0,0,0.05)}.alert-success{background-image:-webkit-linear-gradient(top, #dff0d8 0, #c8e5bc 100%);background-image:-o-linear-gradient(top, #dff0d8 0, #c8e5bc 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #dff0d8), to(#c8e5bc));background-image:linear-gradient(to bottom, #dff0d8 0, #c8e5bc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top, #d9edf7 0, #b9def0 100%);background-image:-o-linear-gradient(top, #d9edf7 0, #b9def0 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #d9edf7), to(#b9def0));background-image:linear-gradient(to bottom, #d9edf7 0, #b9def0 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top, #fcf8e3 0, #f8efc0 100%);background-image:-o-linear-gradient(top, #fcf8e3 0, #f8efc0 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #fcf8e3), to(#f8efc0));background-image:linear-gradient(to bottom, #fcf8e3 0, #f8efc0 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top, #f2dede 0, #e7c3c3 100%);background-image:-o-linear-gradient(top, #f2dede 0, #e7c3c3 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #f2dede), to(#e7c3c3));background-image:linear-gradient(to bottom, #f2dede 0, #e7c3c3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top, #ebebeb 0, #f5f5f5 100%);background-image:-o-linear-gradient(top, #ebebeb 0, #f5f5f5 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #ebebeb), to(#f5f5f5));background-image:linear-gradient(to bottom, #ebebeb 0, #f5f5f5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0)}.progress-bar{background-image:-webkit-linear-gradient(top, #337ab7 0, #286090 100%);background-image:-o-linear-gradient(top, #337ab7 0, #286090 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #337ab7), to(#286090));background-image:linear-gradient(to bottom, #337ab7 0, #286090 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0)}.progress-bar-success{background-image:-webkit-linear-gradient(top, #5cb85c 0, #449d44 100%);background-image:-o-linear-gradient(top, #5cb85c 0, #449d44 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #5cb85c), to(#449d44));background-image:linear-gradient(to bottom, #5cb85c 0, #449d44 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0)}.progress-bar-info{background-image:-webkit-linear-gradient(top, #5bc0de 0, #31b0d5 100%);background-image:-o-linear-gradient(top, #5bc0de 0, #31b0d5 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #5bc0de), to(#31b0d5));background-image:linear-gradient(to bottom, #5bc0de 0, #31b0d5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0)}.progress-bar-warning{background-image:-webkit-linear-gradient(top, #f0ad4e 0, #ec971f 100%);background-image:-o-linear-gradient(top, #f0ad4e 0, #ec971f 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #f0ad4e), to(#ec971f));background-image:linear-gradient(to bottom, #f0ad4e 0, #ec971f 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0)}.progress-bar-danger{background-image:-webkit-linear-gradient(top, #d9534f 0, #c9302c 100%);background-image:-o-linear-gradient(top, #d9534f 0, #c9302c 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #d9534f), to(#c9302c));background-image:linear-gradient(to bottom, #d9534f 0, #c9302c 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0)}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.075);box-shadow:0 1px 2px rgba(0,0,0,0.075)}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{text-shadow:0 -1px 0 #286090;background-image:-webkit-linear-gradient(top, #337ab7 0, #2b669a 100%);background-image:-o-linear-gradient(top, #337ab7 0, #2b669a 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #337ab7), to(#2b669a));background-image:linear-gradient(to bottom, #337ab7 0, #2b669a 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);border-color:#2b669a}.list-group-item.active .badge,.list-group-item.active:hover .badge,.list-group-item.active:focus .badge{text-shadow:none}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top, #f5f5f5 0, #e8e8e8 100%);background-image:-o-linear-gradient(top, #f5f5f5 0, #e8e8e8 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #f5f5f5), to(#e8e8e8));background-image:linear-gradient(to bottom, #f5f5f5 0, #e8e8e8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0)}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top, #337ab7 0, #2e6da4 100%);background-image:-o-linear-gradient(top, #337ab7 0, #2e6da4 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #337ab7), to(#2e6da4));background-image:linear-gradient(to bottom, #337ab7 0, #2e6da4 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0)}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top, #dff0d8 0, #d0e9c6 100%);background-image:-o-linear-gradient(top, #dff0d8 0, #d0e9c6 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #dff0d8), to(#d0e9c6));background-image:linear-gradient(to bottom, #dff0d8 0, #d0e9c6 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0)}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top, #d9edf7 0, #c4e3f3 100%);background-image:-o-linear-gradient(top, #d9edf7 0, #c4e3f3 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #d9edf7), to(#c4e3f3));background-image:linear-gradient(to bottom, #d9edf7 0, #c4e3f3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0)}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top, #fcf8e3 0, #faf2cc 100%);background-image:-o-linear-gradient(top, #fcf8e3 0, #faf2cc 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #fcf8e3), to(#faf2cc));background-image:linear-gradient(to bottom, #fcf8e3 0, #faf2cc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0)}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top, #f2dede 0, #ebcccc 100%);background-image:-o-linear-gradient(top, #f2dede 0, #ebcccc 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #f2dede), to(#ebcccc));background-image:linear-gradient(to bottom, #f2dede 0, #ebcccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0)}.well{background-image:-webkit-linear-gradient(top, #e8e8e8 0, #f5f5f5 100%);background-image:-o-linear-gradient(top, #e8e8e8 0, #f5f5f5 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #e8e8e8), to(#f5f5f5));background-image:linear-gradient(to bottom, #e8e8e8 0, #f5f5f5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,0.05),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 3px rgba(0,0,0,0.05),0 1px 0 rgba(255,255,255,0.1)}
--------------------------------------------------------------------------------
/QLCommonMark/Resources/themes/bootstrap/fonts/glyphicons-halflings-regular.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------