Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
29adb3b
Migrate Sparkle 1.x to 2.x, bump deployment target to macOS 12
robertobissanti Jul 7, 2026
f093cd4
Fix build tooling: path quoting, node-sass, stale lockfile
robertobissanti Jul 7, 2026
525aace
Migrate Markdown preview from WebView to WKWebView
robertobissanti Jul 7, 2026
1bbafac
Fix Auto Layout bug in Rendering preferences pane
robertobissanti Jul 7, 2026
d50f3e7
Fix image drag & drop and preview image width
robertobissanti Jul 7, 2026
a65f068
Add CHANGELOG and update README for this modernization pass
robertobissanti Jul 7, 2026
f988d10
Fix CVE-2019-12138 and CVE-2019-12173
robertobissanti Jul 7, 2026
1cc304f
Migrate CI from Travis to GitHub Actions
robertobissanti Jul 7, 2026
504a0af
Update CHANGELOG: CVE fixes, CI migration, universal binary check
robertobissanti Jul 7, 2026
c5f3c49
Modernize NSToolbarItem sizing and drag-and-drop pasteboard APIs
robertobissanti Jul 7, 2026
7dfae7f
Fix misc deprecated AppKit/Foundation/UTType API usage
robertobissanti Jul 7, 2026
fd24b7e
Bump CocoaPods pod sub-target deployment targets via post_install
robertobissanti Jul 7, 2026
95396b2
Update CHANGELOG: deprecation cleanup and Podfile post_install hook
robertobissanti Jul 7, 2026
04b74c3
Silence build-time warnings: Run Script phases and hoedown headers
robertobissanti Jul 7, 2026
39b5f90
Document xib Auto Layout warnings from build log triage
robertobissanti Jul 7, 2026
f0a937d
Extend hoedown header patch to PAPreferences-framework; note handleba…
robertobissanti Jul 7, 2026
e0df9c8
Fix K&R prototypes and comma-operator warnings in peg-markdown-highlight
robertobissanti Jul 7, 2026
2b09e4e
Fix insertText: deprecation: switch to insertText:replacementRange:
robertobissanti Jul 7, 2026
e9bd38f
Update CHANGELOG: peg-markdown-highlight and insertText: fixes
robertobissanti Jul 7, 2026
ae62fb1
Fix handlebars-objc generated-parser warnings via target OTHER_CFLAGS
robertobissanti Jul 7, 2026
05d5153
Fix EXC_BAD_ACCESS crash: MPDocument.editor IBOutlet was unsafe_unret…
robertobissanti Jul 7, 2026
5d63a32
Fix EXC_BAD_ACCESS: replace hand-cast IMP dispatch with sendAction:to…
robertobissanti Jul 7, 2026
604664b
Remove stale outlet connections in MPTerminalPreferencesViewControlle…
robertobissanti Jul 8, 2026
9e62b44
Modernize MPHomebrewSubprocessController to address a Hang Risk warning
robertobissanti Jul 8, 2026
c807ff7
Fix retain-cycle warning in MPHomebrewSubprocessController
robertobissanti Jul 8, 2026
2a7f56d
Fix Hang Risk in MASPreferencesWindowController; add contributor attr…
robertobissanti Jul 8, 2026
e7c3de2
Sync Xcode workspace state and pending project files
robertobissanti Jul 8, 2026
File filter

Filter by extension

Filter by extension


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

# Replaces the old .travis.yml. Travis CI's free macOS build queue for open
# source projects has been effectively dead for years, and the pinned
# osx_image (xcode10.1) predates this project's current
# MACOSX_DEPLOYMENT_TARGET (12.0) by several major Xcode/macOS releases --
# the check would never realistically complete on current infrastructure.

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
test:
runs-on: macos-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Cache Bundler gems
uses: actions/cache@v4
with:
path: vendor/bundle
key: ${{ runner.os }}-bundler-${{ hashFiles('Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-bundler-

- name: Cache CocoaPods
uses: actions/cache@v4
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-

- name: Install Ruby dependencies
run: |
bundle config set path 'vendor/bundle'
bundle install

- name: Install CocoaPods dependencies
run: bundle exec pod install

- name: Build peg-markdown-highlight
run: make -C Dependency/peg-markdown-highlight

- name: Install xcpretty
run: gem install xcpretty --no-document

- name: Run tests
run: |
set -o pipefail
xcodebuild \
-workspace MacDown.xcworkspace \
-scheme MacDown \
-destination 'platform=macOS' \
test | xcpretty
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@

.DS_Store

# MacDown writes a hidden sidecar HTML file next to whatever document is
# open, to render the live preview (see -[MPDocument renderer:didProduceHTMLOutput:]).
.macdown-preview-*.html

# c.f. http://www.westwind.com/reference/os-x/invisibles.html

.Trashes
Expand Down
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

314 changes: 314 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 54;
objects = {

/* Begin PBXFileReference section */
Expand Down Expand Up @@ -50,7 +50,8 @@
1F8A8367195348C500B6BF69 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0920;
BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 2660;
};
buildConfigurationList = 1F8A836A195348C500B6BF69 /* Build configuration list for PBXProject "peg-markdown-highlight" */;
compatibilityVersion = "Xcode 3.2";
Expand All @@ -76,19 +77,24 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEAD_CODE_STRIPPING = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
Expand All @@ -97,6 +103,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
STRING_CATALOG_GENERATE_SYMBOLS = YES;
};
name = Debug;
};
Expand All @@ -107,39 +114,47 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEAD_CODE_STRIPPING = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
STRING_CATALOG_GENERATE_SYMBOLS = YES;
};
name = Release;
};
1F8A837C195348C500B6BF69 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_ENABLE_FIX_AND_CONTINUE = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
DEAD_CODE_STRIPPING = YES;
};
name = Debug;
};
1F8A837D195348C500B6BF69 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_ENABLE_FIX_AND_CONTINUE = NO;
CLANG_ENABLE_OBJC_WEAK = YES;
DEAD_CODE_STRIPPING = YES;
};
name = Release;
};
Expand Down
20 changes: 17 additions & 3 deletions Dependency/peg-markdown-highlight/pmh_parser_head.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
*
* Code to be inserted into the beginning of the parser code generated
* from the PEG grammar.
*
* Portions Copyright 2026 Roberto Bissanti.
*/

#include "pmh_parser.h"
Expand Down Expand Up @@ -150,7 +152,7 @@ static void parse_references(parser_data *p_data);



static char **get_element_type_names()
static char **get_element_type_names(void)
{
static char **elem_type_names = NULL;
if (elem_type_names == NULL)
Expand Down Expand Up @@ -460,7 +462,12 @@ static int strcpy_preformat(char *str, char **out,
while (*c != '\0')
{
if (!IS_CONTINUATION_BYTE(*c)) {
*(new_str+i) = *c, i++;
// Two statements instead of a comma-operator one-liner: same
// behavior (assign, then increment), but Clang flags the comma
// form as a possible misuse (easy to mistake for the equality
// operator at a glance).
*(new_str+i) = *c;
i++;
} else {
ADD_STRIP_POS((int)(c-str));
}
Expand Down Expand Up @@ -967,7 +974,14 @@ static void yy_input_func(char *buf, int *result, int max_size,
if (p_data->current_elem != NULL)
p_data->offset = p_data->current_elem->pos;
}
(*result) = (EOF == yyc) ? 0 : (*(buf) = yyc, 1);
// Same "assign, then use 1 as the ternary's value" idiom as above,
// rewritten without the comma operator Clang flags.
if (EOF == yyc) {
(*result) = 0;
} else {
*(buf) = yyc;
(*result) = 1;
}
return;
}

Expand Down
14 changes: 8 additions & 6 deletions Dependency/peg-markdown-highlight/pmh_styleparser.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
* Licensed under the GPL2+ and MIT licenses (see LICENSE for more info).
*
* styleparser.c
*
*
* Parser for custom syntax highlighting stylesheets.
*
* Portions Copyright 2026 Roberto Bissanti.
*/

#include <stdio.h>
Expand Down Expand Up @@ -198,12 +200,12 @@ static pmh_attr_argb_color *new_argb_from_hex_str(style_parser_data *p_data,
return new_argb_from_hex(num, (len == 8));
}

static pmh_attr_value *new_attr_value()
static pmh_attr_value *new_attr_value(void)
{
return (pmh_attr_value *)malloc(sizeof(pmh_attr_value));
}

static pmh_attr_font_styles *new_font_styles()
static pmh_attr_font_styles *new_font_styles(void)
{
pmh_attr_font_styles *ret = (pmh_attr_font_styles *)
malloc(sizeof(pmh_attr_font_styles));
Expand All @@ -213,7 +215,7 @@ static pmh_attr_font_styles *new_font_styles()
return ret;
}

static pmh_attr_font_size *new_font_size()
static pmh_attr_font_size *new_font_size(void)
{
pmh_attr_font_size *ret = (pmh_attr_font_size *)
malloc(sizeof(pmh_attr_font_size));
Expand Down Expand Up @@ -544,7 +546,7 @@ typedef struct block
struct block *next;
} block;

static block *new_block()
static block *new_block(void)
{
block *ret = (block *)malloc(sizeof(block));
ret->next = NULL;
Expand Down Expand Up @@ -870,7 +872,7 @@ static void _sty_parse(style_parser_data *p_data)



static pmh_style_collection *new_style_collection()
static pmh_style_collection *new_style_collection(void)
{
pmh_style_collection *sc = (pmh_style_collection *)
malloc(sizeof(pmh_style_collection));
Expand Down
21 changes: 19 additions & 2 deletions Dependency/version/version.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 54;
objects = {

/* Begin PBXFileReference section */
Expand Down Expand Up @@ -40,7 +40,8 @@
1FCD71091A20BA3A00C028B5 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0920;
BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 2660;
ORGANIZATIONNAME = uranusjr;
TargetAttributes = {
1FCD710D1A20BA3A00C028B5 = {
Expand Down Expand Up @@ -72,19 +73,24 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEAD_CODE_STRIPPING = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
Expand All @@ -93,6 +99,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
STRING_CATALOG_GENERATE_SYMBOLS = YES;
};
name = Debug;
};
Expand All @@ -103,31 +110,39 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEAD_CODE_STRIPPING = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
STRING_CATALOG_GENERATE_SYMBOLS = YES;
};
name = Release;
};
1FCD71111A20BA3A00C028B5 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
DEAD_CODE_STRIPPING = YES;
DEBUGGING_SYMBOLS = YES;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
Expand All @@ -140,6 +155,8 @@
1FCD71121A20BA3A00C028B5 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
DEAD_CODE_STRIPPING = YES;
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
Loading