Ver Fonte

feat(flavor: ghost): add Ghost flavor

Estevao Soares dos Santos há 8 anos atrás
pai
commit
6374b5b376
6 ficheiros alterados com 39 adições e 3 exclusões
  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.
 
-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
 ```javascript

+ 17 - 0
dist/showdown.js

@@ -174,6 +174,23 @@ var showdown = {},
         noHeaderId:                           true,
         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),
       allOn: allOptionsOn()
     };

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/showdown.js.map


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/showdown.min.js


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/showdown.min.js.map


+ 17 - 0
src/showdown.js

@@ -29,6 +29,23 @@ var showdown = {},
         noHeaderId:                           true,
         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),
       allOn: allOptionsOn()
     };

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff