Skip to content

Commit b4a1339

Browse files
committed
Several new features and bug fix.
- Visual interface to select the theme. - Now you can edit a css to customize the html output. - Preprocessor for specific file type. - App help.
1 parent b809d97 commit b4a1339

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1993
-795
lines changed

Application/AppDelegate.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
//
22
// AppDelegate.swift
3-
// SourceCodeSyntaxHighlight
3+
// SyntaxHighlight
44
//
55
// Created by sbarex on 15/10/2019.
66
// Copyright © 2019 sbarex. All rights reserved.
77
//
88
//
9-
// This file is part of SourceCodeSyntaxHighlight.
10-
// SourceCodeSyntaxHighlight is free software: you can redistribute it and/or modify
9+
// This file is part of SyntaxHighlight.
10+
// SyntaxHighlight is free software: you can redistribute it and/or modify
1111
// it under the terms of the GNU General Public License as published by
1212
// the Free Software Foundation, either version 3 of the License, or
1313
// (at your option) any later version.
1414
//
15-
// SourceCodeSyntaxHighlight is distributed in the hope that it will be useful,
15+
// SyntaxHighlight is distributed in the hope that it will be useful,
1616
// but WITHOUT ANY WARRANTY; without even the implied warranty of
1717
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1818
// GNU General Public License for more details.
1919
//
2020
// You should have received a copy of the GNU General Public License
21-
// along with SourceCodeSyntaxHighlight. If not, see <http://www.gnu.org/licenses/>.
21+
// along with SyntaxHighlight. If not, see <http://www.gnu.org/licenses/>.
2222

2323
import Cocoa
2424
import Syntax_Highlight_XPC_Service
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "dark.pdf"
6+
}
7+
],
8+
"info" : {
9+
"version" : 1,
10+
"author" : "xcode"
11+
},
12+
"properties" : {
13+
"template-rendering-intent" : "template",
14+
"preserves-vector-representation" : true
15+
}
16+
}
Binary file not shown.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "light.pdf"
6+
}
7+
],
8+
"info" : {
9+
"version" : 1,
10+
"author" : "xcode"
11+
},
12+
"properties" : {
13+
"template-rendering-intent" : "template",
14+
"preserves-vector-representation" : true
15+
}
16+
}
Binary file not shown.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "mixed.pdf"
6+
}
7+
],
8+
"info" : {
9+
"version" : 1,
10+
"author" : "xcode"
11+
},
12+
"properties" : {
13+
"template-rendering-intent" : "template"
14+
}
15+
}
Binary file not shown.

Application/Base.lproj/Main.storyboard

Lines changed: 701 additions & 252 deletions
Large diffs are not rendered by default.

Application/CSSControlView.swift

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
//
2+
// CSSControlView.swift
3+
// SyntaxHighlight
4+
//
5+
// Created by Sbarex on 16/11/2019.
6+
// Copyright © 2019 sbarex. All rights reserved.
7+
//
8+
//
9+
// This file is part of SyntaxHighlight.
10+
// SyntaxHighlight is free software: you can redistribute it and/or modify
11+
// it under the terms of the GNU General Public License as published by
12+
// the Free Software Foundation, either version 3 of the License, or
13+
// (at your option) any later version.
14+
//
15+
// SyntaxHighlight is distributed in the hope that it will be useful,
16+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
// GNU General Public License for more details.
19+
//
20+
// You should have received a copy of the GNU General Public License
21+
// along with SyntaxHighlight. If not, see <http://www.gnu.org/licenses/>.
22+
23+
import Cocoa
24+
25+
class CSSControlView: NSViewController {
26+
var cssCode: String = "" {
27+
didSet {
28+
textView?.string = cssCode
29+
}
30+
}
31+
var handler: ((String)->Void)?
32+
33+
@IBOutlet weak var textView: NSTextView!
34+
35+
@IBAction func showHelp(_ sender: Any) {
36+
if let locBookName = Bundle.main.object(forInfoDictionaryKey: "CFBundleHelpBookName") as? String {
37+
NSHelpManager.shared.openHelpAnchor("SyntaxHighlight_CUSTOMCSS", inBook: locBookName)
38+
}
39+
}
40+
41+
@IBAction func doSave(_ sender: Any) {
42+
handler?(textView.string)
43+
dismiss(sender)
44+
}
45+
46+
override func viewDidLoad() {
47+
textView?.string = cssCode
48+
}
49+
}

Application/CustomTypeViewController.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
//
22
// CustomTypeViewController.swift
3-
// Syntax Highlight
3+
// SyntaxHighlight
44
//
55
// Created by Sbarex on 15/11/2019.
66
// Copyright © 2019 sbarex. All rights reserved.
77
//
88
//
9-
// This file is part of SourceCodeSyntaxHighlight.
10-
// SourceCodeSyntaxHighlight is free software: you can redistribute it and/or modify
9+
// This file is part of SyntaxHighlight.
10+
// SyntaxHighlight is free software: you can redistribute it and/or modify
1111
// it under the terms of the GNU General Public License as published by
1212
// the Free Software Foundation, either version 3 of the License, or
1313
// (at your option) any later version.
1414
//
15-
// SourceCodeSyntaxHighlight is distributed in the hope that it will be useful,
15+
// SyntaxHighlight is distributed in the hope that it will be useful,
1616
// but WITHOUT ANY WARRANTY; without even the implied warranty of
1717
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1818
// GNU General Public License for more details.
1919
//
2020
// You should have received a copy of the GNU General Public License
21-
// along with SourceCodeSyntaxHighlight. If not, see <http://www.gnu.org/licenses/>.
21+
// along with SyntaxHighlight. If not, see <http://www.gnu.org/licenses/>.
2222

2323
import Cocoa
2424
import Syntax_Highlight_XPC_Service

0 commit comments

Comments
 (0)