Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Updated for Pandoc 1.10

Significant modifications to configuraiton settings to fit with changes
in Pandoc 1.10.
  • Loading branch information...
commit 607c7ac7a74632b97ea27eb17b92b06a5d352322 1 parent cc74b18
Daniel Shannon authored January 22, 2013
42  .default-pandoc-config-plain.json
... ...
@@ -1,6 +1,48 @@
1 1
 {
2 2
 	"pandoc_arguments":
3 3
 	{
  4
+		"escaped_line_breaks": true,
  5
+		"blank_before_header": true,
  6
+		"header_attributes": true,
  7
+		"auto_identifiers": true,
  8
+		"implicit_header_references": true,
  9
+		"blank_line_before_blockquote": true,
  10
+		"fenced_code_blocks": true,
  11
+		"line_blocks": true,
  12
+		"fancy_lists": true,
  13
+		"startnum": true,
  14
+		"definition_lists": true,
  15
+		"example_lists": true,
  16
+		"simple_tables": true,
  17
+		"multiline_tables": true,
  18
+		"grid_tables": true,
  19
+		"pipe_tables": true,
  20
+		"table_captions": true,
  21
+		"pandoc_title_block": true,
  22
+		"all_symbols_escapable": true,
  23
+		"intraword_underscores": false,
  24
+		"strikeout": true,
  25
+		"superscript": true,
  26
+		"subscript": true,
  27
+		"inline_code_attributes": true,
  28
+		"tex_math_dollars": true,
  29
+		"raw_html": true,
  30
+		"markdown_in_html_blocks": true,
  31
+		"raw_tex": true,
  32
+		"latex_macros": true,
  33
+		"implicit_figures": true,
  34
+		"footnotes": true,
  35
+		"inline_notes": true,
  36
+		"citations": true,
  37
+		"hard_line_breaks": false,
  38
+		"tex_math_single_backslash": false,
  39
+		"tex_math_double_backslash": false,
  40
+		"markdown_attribute": false,
  41
+		"mmd_title_block": false,
  42
+		"abbreviations": false,
  43
+		"autolink_bare_urls": false,
  44
+		"link_attributes": false,
  45
+		"mmd_header_identifiers": false,
4 46
 		"data_dir": "",
5 47
 		"markdown_strict": false,
6 48
 		"parse_raw": true,
8  Pandown.sublime-build
@@ -75,6 +75,14 @@
75 75
 		  "pandoc_to": ["epub", ".epub"],
76 76
 		  "prevent_viewing": true
77 77
 		},
  78
+		{ "name": "Pandown: EPUB3",
  79
+		  "pandoc_to": ["epub", ".epub"],
  80
+		  "prevent_viewing": true
  81
+		},
  82
+		{ "name": "Pandown: FictionBooks 2",
  83
+		  "pandoc_to": ["fb2", ".fb2"],
  84
+		  "prevent_viewing": true
  85
+		},
78 86
 		{ "name": "Pandown: AsciiDoc",
79 87
 		  "pandoc_to": ["asciidoc", ".txt"]
80 88
 		},
172  Pandown.sublime-settings
@@ -36,6 +36,171 @@
36 36
 	// the readme for information about configuring these options.
37 37
 	"pandoc_arguments":
38 38
 	{
  39
+		/////////////////////////
  40
+		// MARKDOWN EXTENSIONS //
  41
+		/////////////////////////
  42
+		// A backslash followed by a newline is also a line break.
  43
+		"escaped_line_breaks": true,
  44
+
  45
+		// Require a blank line before a header.
  46
+		"blank_before_header": true,
  47
+
  48
+		// Headers can be assigned attributes using this syntax at the end of
  49
+		// the line containing the header text:
  50
+		// {#identifier .class .class key=value key=value}
  51
+		"header_attributes": true,
  52
+
  53
+		// A header without specified attributes will automatically be assigned
  54
+		// a unique identifier based on the header text.
  55
+		"auto_identifiers": true,
  56
+
  57
+		// Pandoc assumes header references have been defined for each header.
  58
+		"implicit_header_references": true,
  59
+
  60
+		// Require a blank line before block quotes. In nested blockquotes,
  61
+		// require:
  62
+		// > Quotation
  63
+		// >
  64
+		// > > Quotation within quotation.
  65
+		"blank_line_before_blockquote": true,
  66
+
  67
+		// Fence code blocks off with tildes or backticks.
  68
+		"fenced_code_blocks": true,
  69
+
  70
+		// Start lines with pipe characters to and the division into lines and
  71
+		// leading whitespace will be preserved. Useful for setting verse and
  72
+		// addresses.
  73
+		"line_blocks": true,
  74
+
  75
+		// Pandoc allows fancier numbering using uppercase letters, lowercase
  76
+		// letters and Roman numerals. List markers may be enclosed in parentheses
  77
+		// or followed by a single right-parenthesis or period, then two spaces.
  78
+		"fancy_lists": true,
  79
+
  80
+		// Pandoc will pay attention to the starting number for each list.
  81
+		"startnum": true,
  82
+
  83
+		// Pandoc supports definition lists; see documentation here for the
  84
+		// correct syntax: http://johnmacfarlane.net/pandoc/README.html#definition-lists
  85
+		"definition_lists": true,
  86
+
  87
+		// The list marker (@) can be used to sequentially number examples in
  88
+		// a way that persists throughout the document.
  89
+		"example_lists": true,
  90
+
  91
+		// Pandoc supports four kinds of tables, the syntax for which is given at:
  92
+		// http://johnmacfarlane.net/pandoc/README.html#tables.
  93
+		"simple_tables": true,
  94
+		"multiline_tables": true,
  95
+		"grid_tables": true,
  96
+		"pipe_tables": true,
  97
+
  98
+		// A table caption is a paragraph beginning with the string "Table:" or a
  99
+		// colon alone. It may be placed at the beginning or end of a table.
  100
+		"table_captions": true,
  101
+
  102
+		// Pandoc allows the inclusion of a title block that will not appear in
  103
+		// the body of the document:
  104
+		// % Title
  105
+		// % Author(s) (separated by semicolons)
  106
+		// % Date
  107
+		"pandoc_title_block": true,
  108
+
  109
+		// A backslash may be used to escape any Markdown symbol.
  110
+		"all_symbols_escapable": true,
  111
+
  112
+		// Using underscores within a word for emphasis is disabled by
  113
+		// default. Use * instead.
  114
+		"intraword_underscores": false,
  115
+
  116
+		// To strike letters in your text, surround them with ~~two tildes~~.
  117
+		"strikeout": true,
  118
+
  119
+		// Superscripts may be written by surrounding text with ^ characters,
  120
+		// subscripts by surrounding text with ~ characters. Escape spaces within
  121
+		// scripts using \ .
  122
+		"superscript": true,
  123
+		"subscript": true,
  124
+
  125
+		// Add attribtues, including syntax highlighting, to inline code.
  126
+		"inline_code_attributes": true,
  127
+
  128
+		// Text between two $ characters will be rendered as LaTeX math.
  129
+		"tex_math_dollars": true,
  130
+
  131
+		// The default behavior in Markdown allows you to insert raw HTML
  132
+		// anywhere in a document.
  133
+		"raw_html": true,
  134
+
  135
+		// By default, Pandoc interprets Markdown in blocks of HTML as Markdown.
  136
+		// This deviates from Markdown.pl's default behavior.
  137
+		"markdown_in_html_blocks": true,
  138
+
  139
+		// Pandoc allows raw TeX to be passed in addition to raw HTML.
  140
+		"raw_tex": true,
  141
+
  142
+		// If set to `true`, Pandoc will use \newcommand and \renewcommand
  143
+		// definitions in all LaTeX math blocks.
  144
+		"latex_macros": true,
  145
+
  146
+		// An image occurring by itself in a paragraph will be rendered as a
  147
+		// figure with a caption: ![This is the caption](path/to/image.jpg)
  148
+		"implicit_figures": true,
  149
+
  150
+		// Pandoc will parse footnotes in the syntax listed here:
  151
+		// http://johnmacfarlane.net/pandoc/README.html#footnotes
  152
+		"footnotes": true,
  153
+		"inline_notes": true,
  154
+
  155
+		// Use the syntax given here for citations:
  156
+		// http://johnmacfarlane.net/pandoc/README.html#citations
  157
+		"citations": true,
  158
+
  159
+		// All newlines within a paragraph will be interpreted as linebreaks
  160
+		// rather than spaces.
  161
+		"hard_line_breaks": false,
  162
+
  163
+		// Anything between \( and \) will be interpreted as TeX inline math,
  164
+		// and anything between \[ and \] as TeX display math.
  165
+		"tex_math_single_backslash": false,
  166
+
  167
+		// Same as above, but escaped with two backslashes.
  168
+		"tex_math_double_backslash": false,
  169
+
  170
+		// Markdown is only parsed within block-level tags if `markdown=1` is
  171
+		// set in their attributes.
  172
+		"markdown_attribute": false,
  173
+
  174
+		// Enables a MultiMarkdown-style title block:
  175
+		// Title:    My Title
  176
+		// Author:   Arthur Author
  177
+		// Date:     January 1, 2013
  178
+		// Comment:  This is a mmd title block, and it even includes
  179
+		//           a field spanning multiple lines.
  180
+		"mmd_title_block": false,
  181
+
  182
+		// Skip PHP Markdown Extra abbreviation keys instead of parsing them
  183
+		// as paragraphs if set to `true`.
  184
+		"abbreviations": false,
  185
+
  186
+		// Makes all absolute URLs into links, even when not enclosed in <...>.
  187
+		"autolink_bare_urls": false,
  188
+
  189
+		// Parse (but ignore, at the moment) MMD-style key--value attribtues
  190
+		// in image and link references.
  191
+		"link_attributes": false,
  192
+
  193
+		// Parses MMD-style header identifiers (in square brackets between header
  194
+		// text and closing ATX #s.
  195
+		"mmd_header_identifiers": false,
  196
+
  197
+
  198
+
  199
+
  200
+
  201
+		////////////////////////////
  202
+		// COMMAND-LINE ARGUMENTS //
  203
+		////////////////////////////
39 204
 		// Modify this setting to tell Pandoc to look for any of the following
40 205
 		// in the specified directory rather than ~/.pandoc or Pandoc's default
41 206
 		// directory tree. Note that this is not an all-purpose includes
@@ -49,13 +214,10 @@
49 214
 		//			slideous/
50 215
 		//			s5/
51 216
 		//			templates/
52  
-		// Anything placed under templates and will be found by the "template"
  217
+		// Anything placed under templates will be found by the "template"
53 218
 		// setting; otherwise, to set an include directory, use the "includes_paths"
54  
-		// option above.
  219
+		// option.
55 220
 		"data_dir": "",
56  
-		
57  
-		// Disable Pandoc's Markdown extensions.
58  
-		"markdown_strict": false,
59 221
 
60 222
 		// "Parse untranslatable HTML codes and LaTeX environments as
61 223
 		// raw HTML or LaTeX, instead of ignoring them."
15  README.mdown
Source Rendered
... ...
@@ -1,14 +1,11 @@
1  
-# [Pandown Plugin for Sublime Text 2][pandown]
2  
-
3  
-## Updates
4  
-Thanks to Kyle L.'s diligence, I managed to catch a few silly bugs that I'd missed. The package should now perform much better than it did before---which is to say, the package should now perform.
  1
+# Pandown Plugin for Sublime Text 2
5 2
 
6 3
 ## Introduction
7  
-This package is designed as a complete, versatile, and highly Subliminal [Sublime Text 2](http://sublimetext.com/) build wrapper for [Pandoc][]. Written by [Daniel Shannon][pandown] and inspired by jclement's [Pandoc (Markdown)](https://github.com/jclement/SublimePandoc) plugin, Pandown is intended to be simple and understandable out of the box but highly customizable behind the scenes. All Pandoc options are configurable, and all input and output formats are theoretically supported, with [Markdown][] implemented most completely.
  4
+This package is designed as a complete, versatile, and highly Subliminal [Sublime Text 2](http://sublimetext.com/) build wrapper for [Pandoc][] **version 1.10 or higher**. Written by [Daniel Shannon][http://daniel.sh] and inspired by jclement's [Pandoc (Markdown)](https://github.com/jclement/SublimePandoc) plugin, Pandown is intended to be simple and understandable out of the box but highly customizable behind the scenes. All Pandoc options are configurable, and all input and output formats are theoretically supported, with [Markdown][] implemented most completely.
8 5
 
9 6
 
10 7
 ## Installation
11  
-Since this is just a build script, you'll need to download and install [Pandoc][] before it'll be of any use to you. The preferred installation method is through [Sublime Package Control](http://wbond.net/sublime_packages/package_control). Users sufficiently knowledgeable and persnickety to want to use another tactic are assumed to know what to do.
  8
+Since this is just a build script, you'll need to download and install [Pandoc][] **version 1.10 or higher** before it'll be of any use to you. The preferred installation method is through [Sublime Package Control](http://wbond.net/sublime_packages/package_control). Users sufficiently knowledgeable and persnickety to want to use another tactic are assumed to know what to do.
12 9
 
13 10
 
14 11
 ## Usage
@@ -20,13 +17,13 @@ This is, of course, not very much fun: you wouldn't be using Sublime if you didn
20 17
 
21 18
 
22 19
 ### Configuration
23  
-You'll find menu items for Pandown's configuration files under "Preferences→Package Settings→Pandown". The Default package settings file is heavily and informatively commented, making it an excellent place to start. Make what changes you'd like in the User settings, which override the defaults, and they'll be reflected on your next build. You can also override both the Default and User settings by changing the `settings` dictionary in your `sublime-project` file.
  20
+You'll find menu items for Pandown's configuration files under "Preferences&rarr;Package Settings&rarr;Pandown". The Default package settings file is heavily and informatively commented, making it an excellent place to start. Make what changes you'd like in the User settings, which override the defaults, and they'll be reflected on your next build. You can also override both the Default and User settings by changing the `settings` dictionary in your `sublime-project` file.
24 21
 
25  
-However, because it's inconvenient to constantly edit and reload the project file, even though so many of the arguments passed to Pandoc will change from project to project, Pandown features a third way to configure Pandoc. Clicking "Preferences→Package Settings→Pandown→Settings -- Project" or choosing "Pandown: Project Settings" in the Command Palette will place a file called `pandoc-config.json` in your current project folder. Setting the values for the `pandoc_arguments` dictionary there will override the settings in your project file _and_ the settings in your `sublime-settings` files. If a config file does not exist in the same folder as the file you're building, Pandown will check the folders above it until it reaches a main project folder---that is, config files apply to the folder they're placed in and all its subfolders.
  22
+However, because it's inconvenient to constantly edit and reload the project file, even though so many of the arguments passed to Pandoc will change from project to project, Pandown features a third way to configure Pandoc. Clicking "Preferences&rarr;Package Settings&rarr;Pandown&rarr;Settings -- Project" or choosing "Pandown: Project Settings" in the Command Palette will place a file called `pandoc-config.json` in your current project folder. Setting the values for the `pandoc_arguments` dictionary there will override the settings in your project file _and_ the settings in your `sublime-settings` files. If a config file does not exist in the same folder as the file you're building, Pandown will check the folders above it until it reaches a main project folder---that is, config files apply to the folder they're placed in and all its subfolders.
26 23
 
27 24
 And this feature is extra-configurable: once you're familiar enough with the Pandoc options you care about to not need the complete set in each new project, you can place a `pandoc-config.json` file in your `Packages/User` folder and it, rather than the default file, will be copied. You can always delete it to restore the original behavior.
28 25
 
29  
-Currently, only arguments to Pandoc will be recognized in per-project configuration files.
  26
+Currently, only arguments to Pandoc and settings for Pandoc's Markdown extensions will be recognized in per-project configuration files.
30 27
 
31 28
 ### Templates
32 29
 The basic template from which Pandoc generates its HTML is just that: basic. And not very attractive. Without much trouble, you can do better on your own. For a non-designer and non-coder type, the stylesheets included with [Brett Terpstra](http://brettterpstra.com)'s wonderful [Marked](http://markedapp.com) app are probably worth taking a look at; run an empty Markdown file through Marked and save it as HTML to get something that can become a lovely template file. (Brett has kindly made uncompressed versions of his CSS [available here](http://support.markedapp.com/kb/how-to-tips-and-tricks/writing-custom-css-for-marked).)
176  default-pandoc-config.json
@@ -11,6 +11,171 @@
11 11
 		// file, please see the Pandown README.								//
12 12
 		//////////////////////////////////////////////////////////////////////
13 13
 
  14
+		/////////////////////////
  15
+		// MARKDOWN EXTENSIONS //
  16
+		/////////////////////////
  17
+		// A backslash followed by a newline is also a line break.
  18
+		"escaped_line_breaks": true,
  19
+
  20
+		// Require a blank line before a header.
  21
+		"blank_before_header": true,
  22
+
  23
+		// Headers can be assigned attributes using this syntax at the end of
  24
+		// the line containing the header text:
  25
+		// {#identifier .class .class key=value key=value}
  26
+		"header_attributes": true,
  27
+
  28
+		// A header without specified attributes will automatically be assigned
  29
+		// a unique identifier based on the header text.
  30
+		"auto_identifiers": true,
  31
+
  32
+		// Pandoc assumes header references have been defined for each header.
  33
+		"implicit_header_references": true,
  34
+
  35
+		// Require a blank line before block quotes. In nested blockquotes,
  36
+		// require:
  37
+		// > Quotation
  38
+		// >
  39
+		// > > Quotation within quotation.
  40
+		"blank_line_before_blockquote": true,
  41
+
  42
+		// Fence code blocks off with tildes or backticks.
  43
+		"fenced_code_blocks": true,
  44
+
  45
+		// Start lines with pipe characters to and the division into lines and
  46
+		// leading whitespace will be preserved. Useful for setting verse and
  47
+		// addresses.
  48
+		"line_blocks": true,
  49
+
  50
+		// Pandoc allows fancier numbering using uppercase letters, lowercase
  51
+		// letters and Roman numerals. List markers may be enclosed in parentheses
  52
+		// or followed by a single right-parenthesis or period, then two spaces.
  53
+		"fancy_lists": true,
  54
+
  55
+		// Pandoc will pay attention to the starting number for each list.
  56
+		"startnum": true,
  57
+
  58
+		// Pandoc supports definition lists; see documentation here for the
  59
+		// correct syntax: http://johnmacfarlane.net/pandoc/README.html#definition-lists
  60
+		"definition_lists": true,
  61
+
  62
+		// The list marker (@) can be used to sequentially number examples in
  63
+		// a way that persists throughout the document.
  64
+		"example_lists": true,
  65
+
  66
+		// Pandoc supports four kinds of tables, the syntax for which is given at:
  67
+		// http://johnmacfarlane.net/pandoc/README.html#tables.
  68
+		"simple_tables": true,
  69
+		"multiline_tables": true,
  70
+		"grid_tables": true,
  71
+		"pipe_tables": true,
  72
+
  73
+		// A table caption is a paragraph beginning with the string "Table:" or a
  74
+		// colon alone. It may be placed at the beginning or end of a table.
  75
+		"table_captions": true,
  76
+
  77
+		// Pandoc allows the inclusion of a title block that will not appear in
  78
+		// the body of the document:
  79
+		// % Title
  80
+		// % Author(s) (separated by semicolons)
  81
+		// % Date
  82
+		"pandoc_title_block": true,
  83
+
  84
+		// A backslash may be used to escape any Markdown symbol.
  85
+		"all_symbols_escapable": true,
  86
+
  87
+		// Using underscores within a word for emphasis is disabled by
  88
+		// default. Use * instead.
  89
+		"intraword_underscores": false,
  90
+
  91
+		// To strike letters in your text, surround them with ~~two tildes~~.
  92
+		"strikeout": true,
  93
+
  94
+		// Superscripts may be written by surrounding text with ^ characters,
  95
+		// subscripts by surrounding text with ~ characters. Escape spaces within
  96
+		// scripts using \ .
  97
+		"superscript": true,
  98
+		"subscript": true,
  99
+
  100
+		// Add attribtues, including syntax highlighting, to inline code.
  101
+		"inline_code_attributes": true,
  102
+
  103
+		// Text between two $ characters will be rendered as LaTeX math.
  104
+		"tex_math_dollars": true,
  105
+
  106
+		// The default behavior in Markdown allows you to insert raw HTML
  107
+		// anywhere in a document.
  108
+		"raw_html": true,
  109
+
  110
+		// By default, Pandoc interprets Markdown in blocks of HTML as Markdown.
  111
+		// This deviates from Markdown.pl's default behavior.
  112
+		"markdown_in_html_blocks": true,
  113
+
  114
+		// Pandoc allows raw TeX to be passed in addition to raw HTML.
  115
+		"raw_tex": true,
  116
+
  117
+		// If set to `true`, Pandoc will use \newcommand and \renewcommand
  118
+		// definitions in all LaTeX math blocks.
  119
+		"latex_macros": true,
  120
+
  121
+		// An image occurring by itself in a paragraph will be rendered as a
  122
+		// figure with a caption: ![This is the caption](path/to/image.jpg)
  123
+		"implicit_figures": true,
  124
+
  125
+		// Pandoc will parse footnotes in the syntax listed here:
  126
+		// http://johnmacfarlane.net/pandoc/README.html#footnotes
  127
+		"footnotes": true,
  128
+		"inline_notes": true,
  129
+
  130
+		// Use the syntax given here for citations:
  131
+		// http://johnmacfarlane.net/pandoc/README.html#citations
  132
+		"citations": true,
  133
+
  134
+		// All newlines within a paragraph will be interpreted as linebreaks
  135
+		// rather than spaces.
  136
+		"hard_line_breaks": false,
  137
+
  138
+		// Anything between \( and \) will be interpreted as TeX inline math,
  139
+		// and anything between \[ and \] as TeX display math.
  140
+		"tex_math_single_backslash": false,
  141
+
  142
+		// Same as above, but escaped with two backslashes.
  143
+		"tex_math_double_backslash": false,
  144
+
  145
+		// Markdown is only parsed within block-level tags if `markdown=1` is
  146
+		// set in their attributes.
  147
+		"markdown_attribute": false,
  148
+
  149
+		// Enables a MultiMarkdown-style title block:
  150
+		// Title:    My Title
  151
+		// Author:   Arthur Author
  152
+		// Date:     January 1, 2013
  153
+		// Comment:  This is a mmd title block, and it even includes
  154
+		//           a field spanning multiple lines.
  155
+		"mmd_title_block": false,
  156
+
  157
+		// Skip PHP Markdown Extra abbreviation keys instead of parsing them
  158
+		// as paragraphs if set to `true`.
  159
+		"abbreviations": false,
  160
+
  161
+		// Makes all absolute URLs into links, even when not enclosed in <...>.
  162
+		"autolink_bare_urls": false,
  163
+
  164
+		// Parse (but ignore, at the moment) MMD-style key--value attribtues
  165
+		// in image and link references.
  166
+		"link_attributes": false,
  167
+
  168
+		// Parses MMD-style header identifiers (in square brackets between header
  169
+		// text and closing ATX #s.
  170
+		"mmd_header_identifiers": false,
  171
+
  172
+
  173
+
  174
+
  175
+
  176
+		////////////////////////////
  177
+		// COMMAND-LINE ARGUMENTS //
  178
+		////////////////////////////
14 179
 		// Modify this setting to tell Pandoc to look for any of the following
15 180
 		// in the specified directory rather than ~/.pandoc or Pandoc's default
16 181
 		// directory tree. Note that this is not an all-purpose includes
@@ -28,9 +193,6 @@
28 193
 		// setting; otherwise, to set an include directory, use the "includes_paths"
29 194
 		// option above.
30 195
 		"data_dir": "",
31  
-		
32  
-		// Disable Pandoc's Markdown extensions.
33  
-		"markdown_strict": false,
34 196
 
35 197
 		// "Parse untranslatable HTML codes and LaTeX environments as
36 198
 		// raw HTML or LaTeX, instead of ignoring them."
@@ -46,8 +208,9 @@
46 208
 		// "Speficy the base level for headers"
47 209
 		"base_header_level": 1,
48 210
 
49  
-		// Apply code classes to all indented code blocks. N.B.: Does not
50  
-		// apply to fenced code, which must still be configured inline.
  211
+		// Apply code classes to all indented code blocks. N.B.:
  212
+		// does not apply to fenced code, which must still be
  213
+		// configured inline.
51 214
 		// MUST BE DEFINED AS A LIST, EVEN IF EMPTY. This is correct:
52 215
 		//		"indented_code_classes": [],
53 216
 		// and so is this:
@@ -118,6 +281,9 @@
118 281
 		// output can be viewed offline.
119 282
 		"self_contained": false,
120 283
 
  284
+		// Use <q> tags for quotes in HTML5 output
  285
+		"html_q_tags": false,
  286
+
121 287
 		// In HTML output ONLY, restrict to ASCII characters
122 288
 		// with numerical HTML entities.
123 289
 		"ascii": false,
4  messages.json
... ...
@@ -1,5 +1,7 @@
1 1
 {
2 2
 	"install": "messages/install.txt",
3 3
 	"1.0.0": "messages/1.0.0.txt",
4  
-	"1.1.0": "messages/1.1.0.txt"
  4
+	"1.1.0": "messages/1.1.0.txt",
  5
+	"1.2.0": "messages/1.2.0.txt",
  6
+	"1.3.0": "messages/1.3.0.txt"
5 7
 }
14  messages/1.3.0.txt
... ...
@@ -0,0 +1,14 @@
  1
+        Pandown Plugin for Sublime Text 2
  2
+------------------------------------------------
  3
+                Version 1.3.0
  4
+
  5
+MAJOR IMPROVEMENTS
  6
+    * Now designed to work with Pandoc version
  7
+      1.10 or higher. Versions lower than 1.10
  8
+      will no longer be supported or tested.
  9
+      Please upgrade to continue using Pandown.
  10
+
  11
+MINOR FIXES
  12
+	* UTF-8 characters that were bewildering
  13
+	  Pandoc have been removed from the sample
  14
+	  files and README.
2  messages/install.txt
@@ -7,5 +7,7 @@ now's the time:
7 7
 
8 8
 http://johnmacfarlane.net/pandoc/
9 9
 
  10
+Note that Pandown requires Pandoc
  11
+1.10 or later to work correctly.
10 12
 As ever, it's not a bad idea to
11 13
 check out the README.mdown file.
250  pandownBuildCommand.py
@@ -272,22 +272,6 @@ def _walkIncludes(self, lookFor, prepend=None):
272 272
     def _buildPandocCmd(self, inFile, to, pandoc_from, a):
273 273
         cmd = ['pandoc']
274 274
 
275  
-        if self.fromDirty:
276  
-            cmd.append("--from=" + pandoc_from)
277  
-            cmd.append("--to=" + to[0])
278  
-            inFile = self.tempLoc
279  
-        elif self.toWindow:
280  
-            pass
281  
-        elif self.makePDF:
282  
-            self.outFile = os.path.splitext(inFile)[0] + ".pdf"
283  
-            cmd.append("--output=" + self.outFile)
284  
-            cmd.append("--from=" + pandoc_from)
285  
-        else:
286  
-            self.outFile = os.path.splitext(inFile)[0] + to[1]
287  
-            cmd.append("--output=" + self.outFile)
288  
-            cmd.append("--to=" + to[0])
289  
-            cmd.append("--from=" + pandoc_from)
290  
-
291 275
         try:
292 276
             f = open(os.path.join(sublime.packages_path(), 'Pandown', '.default-pandoc-config-plain.json'))
293 277
         except IOError as e:
@@ -339,11 +323,239 @@ def _buildPandocCmd(self, inFile, to, pandoc_from, a):
339 323
             s["css"].extend(p.pop("css", []))
340 324
             s.update(p)
341 325
 
  326
+        if pandoc_from == "markdown":
  327
+            # Parse Pandoc Markdown extensions
  328
+            if s["escaped_line_breaks"]:
  329
+                pandoc_from += "+escaped_line_breaks"
  330
+            else:
  331
+                pandoc_from += "-escaped_line_breaks"
  332
+
  333
+            if s["blank_before_header"]:
  334
+                pandoc_from += "+blank_before_header"
  335
+            else:
  336
+                pandoc_from += "-blank_before_header"
  337
+
  338
+            if s["header_attributes"]:
  339
+                pandoc_from += "+header_attributes"
  340
+            else:
  341
+                pandoc_from += "-header_attributes"
  342
+
  343
+            if s["auto_identifiers"]:
  344
+                pandoc_from += "+auto_identifiers"
  345
+            else:
  346
+                pandoc_from += "-auto_identifiers"
  347
+
  348
+            if s["implicit_header_references"]:
  349
+                pandoc_from += "+implicit_header_references"
  350
+            else:
  351
+                pandoc_from += "-implicit_header_references"
  352
+
  353
+            if s["blank_line_before_blockquote"]:
  354
+                pandoc_from += "+blank_line_before_blockquote"
  355
+            else:
  356
+                pandoc_from += "-blank_line_before_blockquote"
  357
+
  358
+            if s["fenced_code_blocks"]:
  359
+                pandoc_from += "+fenced_code_blocks"
  360
+            else:
  361
+                pandoc_from += "-fenced_code_blocks"
  362
+
  363
+            if s["line_blocks"]:
  364
+                pandoc_from += "+line_blocks"
  365
+            else:
  366
+                pandoc_from += "-line_blocks"
  367
+
  368
+            if s["fancy_lists"]:
  369
+                pandoc_from += "+fancy_lists"
  370
+            else:
  371
+                pandoc_from += "-fancy_lists"
  372
+
  373
+            if s["startnum"]:
  374
+                pandoc_from += "+startnum"
  375
+            else:
  376
+                pandoc_from += "-startnum"
  377
+
  378
+            if s["definition_lists"]:
  379
+                pandoc_from += "+definition_lists"
  380
+            else:
  381
+                pandoc_from += "-definition_lists"
  382
+
  383
+            if s["example_lists"]:
  384
+                pandoc_from += "+example_lists"
  385
+            else:
  386
+                pandoc_from += "-example_lists"
  387
+
  388
+            if s["simple_tables"]:
  389
+                pandoc_from += "+simple_tables"
  390
+            else:
  391
+                pandoc_from += "-simple_tables"
  392
+
  393
+            if s["multiline_tables"]:
  394
+                pandoc_from += "+multiline_tables"
  395
+            else:
  396
+                pandoc_from += "-multiline_tables"
  397
+
  398
+            if s["grid_tables"]:
  399
+                pandoc_from += "+grid_tables"
  400
+            else:
  401
+                pandoc_from += "-grid_tables"
  402
+
  403
+            if s["pipe_tables"]:
  404
+                pandoc_from += "+pipe_tables"
  405
+            else:
  406
+                pandoc_from += "-pipe_tables"
  407
+
  408
+            if s["table_captions"]:
  409
+                pandoc_from += "+table_captions"
  410
+            else:
  411
+                pandoc_from += "-table_captions"
  412
+
  413
+            if s["pandoc_title_block"]:
  414
+                pandoc_from += "+pandoc_title_block"
  415
+            else:
  416
+                pandoc_from += "-pandoc_title_block"
  417
+
  418
+            if s["all_symbols_escapable"]:
  419
+                pandoc_from += "+all_symbols_escapable"
  420
+            else:
  421
+                pandoc_from += "-all_symbols_escapable"
  422
+
  423
+            if s["intraword_underscores"]:
  424
+                pandoc_from += "+intraword_underscores"
  425
+            else:
  426
+                pandoc_from += "-intraword_underscores"
  427
+
  428
+            if s["strikeout"]:
  429
+                pandoc_from += "+strikeout"
  430
+            else:
  431
+                pandoc_from += "-strikeout"
  432
+
  433
+            if s["superscript"]:
  434
+                pandoc_from += "+superscript"
  435
+            else:
  436
+                pandoc_from += "-superscript"
  437
+
  438
+            if s["subscript"]:
  439
+                pandoc_from += "+subscript"
  440
+            else:
  441
+                pandoc_from += "-subscript"
  442
+
  443
+            if s["inline_code_attributes"]:
  444
+                pandoc_from += "+inline_code_attributes"
  445
+            else:
  446
+                pandoc_from += "-inline_code_attributes"
  447
+
  448
+            if s["tex_math_dollars"]:
  449
+                pandoc_from += "+tex_math_dollars"
  450
+            else:
  451
+                pandoc_from += "-tex_math_dollars"
  452
+
  453
+            if s["raw_html"]:
  454
+                pandoc_from += "+raw_html"
  455
+            else:
  456
+                pandoc_from += "-raw_html"
  457
+
  458
+            if s["markdown_in_html_blocks"]:
  459
+                pandoc_from += "+markdown_in_html_blocks"
  460
+            else:
  461
+                pandoc_from += "-markdown_in_html_blocks"
  462
+
  463
+            if s["raw_tex"]:
  464
+                pandoc_from += "+raw_tex"
  465
+            else:
  466
+                pandoc_from += "-raw_tex"
  467
+
  468
+            if s["latex_macros"]:
  469
+                pandoc_from += "+latex_macros"
  470
+            else:
  471
+                pandoc_from += "-latex_macros"
  472
+
  473
+            if s["implicit_figures"]:
  474
+                pandoc_from += "+implicit_figures"
  475
+            else:
  476
+                pandoc_from += "-implicit_figures"
  477
+
  478
+            if s["footnotes"]:
  479
+                pandoc_from += "+footnotes"
  480
+            else:
  481
+                pandoc_from += "-footnotes"
  482
+
  483
+            if s["inline_notes"]:
  484
+                pandoc_from += "+inline_notes"
  485
+            else:
  486
+                pandoc_from += "-inline_notes"
  487
+
  488
+            if s["citations"]:
  489
+                pandoc_from += "+citations"
  490
+            else:
  491
+                pandoc_from += "-citations"
  492
+
  493
+            if s["hard_line_breaks"]:
  494
+                pandoc_from += "+hard_line_breaks"
  495
+            else:
  496
+                pandoc_from += "-hard_line_breaks"
  497
+
  498
+            if s["tex_math_single_backslash"]:
  499
+                pandoc_from += "+tex_math_single_backslash"
  500
+            else:
  501
+                pandoc_from += "-tex_math_single_backslash"
  502
+
  503
+            if s["tex_math_double_backslash"]:
  504
+                pandoc_from += "+tex_math_double_backslash"
  505
+            else:
  506
+                pandoc_from += "-tex_math_double_backslash"
  507
+
  508
+            if s["markdown_attribute"]:
  509
+                pandoc_from += "+markdown_attribute"
  510
+            else:
  511
+                pandoc_from += "-markdown_attribute"
  512
+
  513
+            if s["mmd_title_block"]:
  514
+                pandoc_from += "+mmd_title_block"
  515
+            else:
  516
+                pandoc_from += "-mmd_title_block"
  517
+
  518
+            if s["abbreviations"]:
  519
+                pandoc_from += "+abbreviations"
  520
+            else:
  521
+                pandoc_from += "-abbreviations"
  522
+
  523
+            if s["autolink_bare_urls"]:
  524
+                pandoc_from += "+autolink_bare_urls"
  525
+            else:
  526
+                pandoc_from += "-autolink_bare_urls"
  527
+
  528
+            if s["link_attributes"]:
  529
+                pandoc_from += "+link_attributes"
  530
+            else:
  531
+                pandoc_from += "-link_attributes"
  532
+
  533
+            if s["mmd_header_identifiers"]:
  534
+                pandoc_from += "+mmd_header_identifiers"
  535
+            else:
  536
+                pandoc_from += "-mmd_header_identifiers"
  537
+
  538
+
  539
+
  540
+        if self.fromDirty:
  541
+            cmd.append("--from=" + pandoc_from)
  542
+            cmd.append("--to=" + to[0])
  543
+            inFile = self.tempLoc
  544
+        elif self.toWindow:
  545
+            pass
  546
+        elif self.makePDF:
  547
+            self.outFile = os.path.splitext(inFile)[0] + ".pdf"
  548
+            cmd.append("--output=" + self.outFile)
  549
+            cmd.append("--from=" + pandoc_from)
  550
+        else:
  551
+            self.outFile = os.path.splitext(inFile)[0] + to[1]
  552
+            cmd.append("--output=" + self.outFile)
  553
+            cmd.append("--to=" + to[0])
  554
+            cmd.append("--from=" + pandoc_from)
  555
+
342 556
         try:
343 557
             if s["data_dir"]:
344 558
                 cmd.append("--data-dir=" + s["data_dir"])
345  
-            if s["markdown_strict"]:
346  
-                cmd.append("--markdown-strict")
347 559
             if s["parse_raw"]:
348 560
                 cmd.append("--parse-raw")
349 561
             if s["smart"]:
@@ -417,6 +629,8 @@ def _buildPandocCmd(self, inFile, to, pandoc_from, a):
417 629
 
418 630
             if s["self_contained"]:
419 631
                 cmd.append("--self-contained")
  632
+            if s["html_q_tags"]:
  633
+                cmd.append("--html-q-tags")
420 634
             if s["ascii"]:
421 635
                 cmd.append("--ascii")
422 636
             if s["reference_links"]:

0 notes on commit 607c7ac

Please sign in to comment.
Something went wrong with that request. Please try again.