Skip to content

Commit

Permalink
Bugfix.
Browse files Browse the repository at this point in the history
  • Loading branch information
sbarex committed Feb 11, 2022
1 parent 5109670 commit e15fd01
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 9 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Changelog


### 1.0.12 (37)
Bugfix:
- Better procedure for install the command line tool.
- Fixed the bug that prevented the processing of html raw images when they are not inserted in a html block element.

### 1.0.11 (36)
New features:
- Support for opening markdown files (by dragging the file onto the app icon)
Expand Down
16 changes: 8 additions & 8 deletions QLMarkdown.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1433,7 +1433,7 @@
CODE_SIGN_ENTITLEMENTS = QLExtension/QLExtension.entitlements;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 36;
CURRENT_PROJECT_VERSION = 37;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = NO;
HEADER_SEARCH_PATHS = (
Expand All @@ -1453,7 +1453,7 @@
"$(BUILT_PRODUCTS_DIR)/libpcre2/lib",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 1.0.11;
MARKETING_VERSION = 1.0.12;
PRODUCT_BUNDLE_IDENTIFIER = org.sbarex.QLMarkdown.QLExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -1470,7 +1470,7 @@
CODE_SIGN_ENTITLEMENTS = QLExtension/QLExtension.entitlements;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 36;
CURRENT_PROJECT_VERSION = 37;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = NO;
HEADER_SEARCH_PATHS = (
Expand All @@ -1490,7 +1490,7 @@
"$(BUILT_PRODUCTS_DIR)/libpcre2/lib",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 1.0.11;
MARKETING_VERSION = 1.0.12;
PRODUCT_BUNDLE_IDENTIFIER = org.sbarex.QLMarkdown.QLExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -1684,7 +1684,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 36;
CURRENT_PROJECT_VERSION = 37;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = NO;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
Expand All @@ -1706,7 +1706,7 @@
"$(BUILT_PRODUCTS_DIR)/libpcre2/lib",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 1.0.11;
MARKETING_VERSION = 1.0.12;
PRODUCT_BUNDLE_IDENTIFIER = org.sbarex.QLMarkdown;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -1727,7 +1727,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 36;
CURRENT_PROJECT_VERSION = 37;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = NO;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
Expand All @@ -1749,7 +1749,7 @@
"$(BUILT_PRODUCTS_DIR)/libpcre2/lib",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 1.0.11;
MARKETING_VERSION = 1.0.12;
PRODUCT_BUNDLE_IDENTIFIER = org.sbarex.QLMarkdown;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
5 changes: 5 additions & 0 deletions QLMarkdown/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@
<action selector="exportPreview:" target="Ady-hI-5gd" id="ThC-Ot-hlN"/>
</connections>
</menuItem>
<menuItem title="Reload Markdown source" keyEquivalent="R" id="oCc-uW-APD">
<connections>
<action selector="reloadMarkdown:" target="Ady-hI-5gd" id="iOr-Z4-dVU"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="U4l-0Q-Iha"/>
<menuItem title="Save settings" keyEquivalent="s" id="pxx-59-PXV">
<connections>
Expand Down
12 changes: 12 additions & 0 deletions QLMarkdown/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,18 @@ class ViewController: NSViewController {
}
}

@IBAction func reloadMarkdown(_ sender: Any) {
guard let file = self.markdown_file else {
return
}
let prev_scroll = self.prev_scroll
self.openMarkdown(file: file)
self.prev_scroll = prev_scroll
if prev_scroll > 0 {
webView.evaluateJavaScript("document.documentElement.scrollTop = \(prev_scroll);")
}
}

@IBAction func exportPreview(_ sender: Any) {
let savePanel = NSSavePanel()
savePanel.canCreateDirectories = true
Expand Down
2 changes: 1 addition & 1 deletion cmark-gfm/extensions/inlineimage.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ static cmark_node *postprocess(cmark_syntax_extension *ext, cmark_parser *parser
cmark_chunk_set_cstr(mem, &node->as.link.url, encoded);
free(encoded);
}
} else if (node->type == CMARK_NODE_HTML_BLOCK && html_callback != NULL) {
} else if ((node->type == CMARK_NODE_HTML_BLOCK || node->type == CMARK_NODE_HTML_INLINE) && html_callback != NULL) {
// Search inside the raw html fragment and process the images.
cmark_chunk_to_cstr(parser->mem, &node->as.literal);
unsigned char *s = NULL;
Expand Down

0 comments on commit e15fd01

Please sign in to comment.