Browse Source

feat(flavor: ghost): add Ghost flavor

Estevao Soares dos Santos 8 years ago
parent
commit
6374b5b376
6 changed files with 39 additions and 3 deletions
  1. 5 3
      README.md
  2. 17 0
      dist/showdown.js
  3. 0 0
      dist/showdown.js.map
  4. 0 0
      dist/showdown.min.js
  5. 0 0
      dist/showdown.min.js.map
  6. 17 0
      src/showdown.js

+ 5 - 3
README.md

@@ -310,10 +310,12 @@ var defaultOptions = showdown.getDefaultOptions();
 
 
 You can also use flavors or presets to set the correct options automatically, so that showdown behaves like popular markdown flavors.
 You can also use flavors or presets to set the correct options automatically, so that showdown behaves like popular markdown flavors.
 
 
-Currently, there are two flavors available:
+Currently, the following flavors are available:
+
+ * original - original markdown flavor as in [John Gruber's spec](https://daringfireball.net/projects/markdown/)
+ * vanilla  - showdown base flavor (as from v1.3.1)
+ * github   - GFM (GitHub Flavored Markdown)
 
 
- * github - GFM (GitHub Flavored Markdown)
- * vanilla - original markdown flavor
 
 
 ### Global
 ### Global
 ```javascript
 ```javascript

+ 17 - 0
dist/showdown.js

@@ -174,6 +174,23 @@ var showdown = {},
         noHeaderId:                           true,
         noHeaderId:                           true,
         ghCodeBlocks:                         false
         ghCodeBlocks:                         false
       },
       },
+      ghost: {
+        omitExtraWLInCodeBlocks:              true,
+        parseImgDimensions:                   true,
+        simplifiedAutoLink:                   true,
+        excludeTrailingPunctuationFromURLs:   true,
+        literalMidWordUnderscores:            true,
+        strikethrough:                        true,
+        tables:                               true,
+        tablesHeaderId:                       true,
+        ghCodeBlocks:                         true,
+        tasklists:                            true,
+        smoothLivePreview:                    true,
+        simpleLineBreaks:                     true,
+        requireSpaceBeforeHeadingText:        true,
+        ghMentions:                           false,
+        encodeEmails:                         true
+      },
       vanilla: getDefaultOpts(true),
       vanilla: getDefaultOpts(true),
       allOn: allOptionsOn()
       allOn: allOptionsOn()
     };
     };

File diff suppressed because it is too large
+ 0 - 0
dist/showdown.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/showdown.min.js


File diff suppressed because it is too large
+ 0 - 0
dist/showdown.min.js.map


+ 17 - 0
src/showdown.js

@@ -29,6 +29,23 @@ var showdown = {},
         noHeaderId:                           true,
         noHeaderId:                           true,
         ghCodeBlocks:                         false
         ghCodeBlocks:                         false
       },
       },
+      ghost: {
+        omitExtraWLInCodeBlocks:              true,
+        parseImgDimensions:                   true,
+        simplifiedAutoLink:                   true,
+        excludeTrailingPunctuationFromURLs:   true,
+        literalMidWordUnderscores:            true,
+        strikethrough:                        true,
+        tables:                               true,
+        tablesHeaderId:                       true,
+        ghCodeBlocks:                         true,
+        tasklists:                            true,
+        smoothLivePreview:                    true,
+        simpleLineBreaks:                     true,
+        requireSpaceBeforeHeadingText:        true,
+        ghMentions:                           false,
+        encodeEmails:                         true
+      },
       vanilla: getDefaultOpts(true),
       vanilla: getDefaultOpts(true),
       allOn: allOptionsOn()
       allOn: allOptionsOn()
     };
     };

Some files were not shown because too many files changed in this diff