Skip to content

Commit

Permalink
Add WikiLink markdown extension support
Browse files Browse the repository at this point in the history
  • Loading branch information
lukakerr committed Mar 11, 2019
1 parent 9e75f52 commit 90527f4
Show file tree
Hide file tree
Showing 12 changed files with 981 additions and 788 deletions.
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,25 @@

[Unreleased]
### New Features
- Added support for WikiLink (`[[Description|./path/to/note.md]]`) markdown extensions

### Fixes
- Fix some themes having incorrect colors
- Fix `open -a` not working at times

### Other
- Refactored sidebar and tabs

[0.0.7] - 2019-03-09
## [0.0.8] - 2019-03-10
### New Features
- Ability to open files and folders via `open -a /Applications/Pine.app file.md folder/`

### Fixes
- Set syntax highlighting theme when changed in preview

### Other

## [0.0.7] - 2019-03-09
### New Features
- GitHub emoji support
- Footnote support
Expand Down
36 changes: 8 additions & 28 deletions Pine.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
588095572A370959E97BFD12 /* Pods_Pine.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B66B7DAE689A6827E658233B /* Pods_Pine.framework */; };
8F34580B873BD2CCD033F53B /* Pods_Pine.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 300B3A71DC5543C53B684729 /* Pods_Pine.framework */; };
A104782520E7338800E0930A /* FileSystemItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = A104782420E7338800E0930A /* FileSystemItem.swift */; };
A10B86DD2227BB3E000656DD /* PreferencesSplitViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A10B86DC2227BB3E000656DD /* PreferencesSplitViewController.swift */; };
Expand Down Expand Up @@ -172,6 +173,7 @@
buildActionMask = 2147483647;
files = (
8F34580B873BD2CCD033F53B /* Pods_Pine.framework in Frameworks */,
588095572A370959E97BFD12 /* Pods_Pine.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -833,10 +835,7 @@
"$(PROJECT_DIR)/Pine",
);
INFOPLIST_FILE = Pine/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.12;
PRODUCT_BUNDLE_IDENTIFIER = io.github.lukakerr.Pine;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -860,10 +859,7 @@
"$(PROJECT_DIR)/Pine",
);
INFOPLIST_FILE = Pine/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.12;
PRODUCT_BUNDLE_IDENTIFIER = io.github.lukakerr.Pine;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -881,11 +877,7 @@
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = PineTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@loader_path/../Frameworks",
);
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.14;
PRODUCT_BUNDLE_IDENTIFIER = io.github.lukakerr.PineTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -903,11 +895,7 @@
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = PineTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@loader_path/../Frameworks",
);
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.14;
PRODUCT_BUNDLE_IDENTIFIER = io.github.lukakerr.PineTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -924,11 +912,7 @@
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = PineUITests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@loader_path/../Frameworks",
);
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.14;
PRODUCT_BUNDLE_IDENTIFIER = io.github.lukakerr.PineUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -945,11 +929,7 @@
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = PineUITests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@loader_path/../Frameworks",
);
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.14;
PRODUCT_BUNDLE_IDENTIFIER = io.github.lukakerr.PineUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
7 changes: 6 additions & 1 deletion Pine/Models/Preferences/Preferences.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ enum Preference {
static let markdownTables = PreferenceKey<Bool>("markdownTables", defaultValue: true)
static let markdownAutolink = PreferenceKey<Bool>("markdownAutolink", defaultValue: true)
static let markdownMentions = PreferenceKey<Bool>("markdownMentions", defaultValue: true)
static let markdownFootnotes = PreferenceKey<Bool>("markdownFootnotes", defaultValue: true)
static let markdownFootnotes = PreferenceKey<Bool>("markdownFootnotes", defaultValue: false)
static let markdownCheckboxes = PreferenceKey<Bool>("markdownCheckboxes", defaultValue: true)
static let markdownWikilinks = PreferenceKey<Bool>("markdownWikilinks", defaultValue: false)
static let markdownStrikethrough = PreferenceKey<Bool>("markdownStrikethrough", defaultValue: true)
}

Expand Down Expand Up @@ -95,6 +96,10 @@ class Preferences {
extensions.append(.checkbox)
}

if self[Preference.markdownWikilinks] {
extensions.append(.wikilink)
}

if self[Preference.markdownStrikethrough] {
extensions.append(.strikethrough)
}
Expand Down
1 change: 1 addition & 0 deletions Pine/Views/Preferences/MarkdownStackView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class MarkdownStackView: NSStackView, PreferenceStackView {
"GitHub @ Mentions": Preference.markdownMentions,
"Footnotes": Preference.markdownFootnotes,
"Checkboxes": Preference.markdownCheckboxes,
"WikiLinks": Preference.markdownWikilinks,
"Strikethrough": Preference.markdownStrikethrough
]

Expand Down
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ EXTERNAL SOURCES:

CHECKOUT OPTIONS:
cmark-gfm-swift:
:commit: 9e9f8dfba1a54fbe10f2acadfbea6b8252bd3cf0
:commit: a8f6fcf3eecc6292f8876ac7a825e9651f0297b7
:git: https://github.com/lukakerr/cmark-gfm-swift.git
Highlightr:
:commit: bd57404c28527b4d40ee15ce9f61fad734ad50a1
Expand Down
2 changes: 1 addition & 1 deletion Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 90527f4

Please sign in to comment.