Skip to content

Commit

Permalink
Update defaults to match Github conventions (closes mixmark-io#424)
Browse files Browse the repository at this point in the history
  • Loading branch information
zm-cttae authored Mar 4, 2023
1 parent 4499b5c commit 21471d7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,16 @@ var turndownService = new TurndownService({ option: 'value' })

| Option | Valid values | Default |
| :-------------------- | :------------ | :------ |
| `headingStyle` | `setext` or `atx` | `setext` |
| `hr` | Any [Thematic break](http://spec.commonmark.org/0.27/#thematic-breaks) | `* * *` |
| `bulletListMarker` | `-`, `+`, or `*` | `*` |
| `codeBlockStyle` | `indented` or `fenced` | `indented` |
| `headingStyle` | `setext` or `atx` | `atx` |
| `hr` | Any [Thematic break](http://spec.commonmark.org/0.27/#thematic-breaks) | `---` |
| `bulletListMarker` | `-`, `+`, or `*` | `-` |
| `codeBlockStyle` | `indented` or `fenced` | `fenced` |
| `fence` | ` ``` ` or `~~~` | ` ``` ` |
| `emDelimiter` | `_` or `*` | `_` |
| `emDelimiter` | `_` or `*` | `*` |
| `strongDelimiter` | `**` or `__` | `**` |
| `linkStyle` | `inlined` or `referenced` | `inlined` |
| `linkReferenceStyle` | `full`, `collapsed`, or `shortcut` | `full` |
| `br` | ` ` or `\n` | `\n` |
| `preformattedCode` | `false` or [`true`](https://github.com/lucthev/collapse-whitespace/issues/16) | `false` |

### Advanced Options
Expand Down
12 changes: 6 additions & 6 deletions src/turndown.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ export default function TurndownService (options) {

var defaults = {
rules: COMMONMARK_RULES,
headingStyle: 'setext',
hr: '* * *',
bulletListMarker: '*',
codeBlockStyle: 'indented',
headingStyle: 'atx',
hr: '---',
bulletListMarker: '-',
codeBlockStyle: 'fence',
fence: '```',
emDelimiter: '_',
emDelimiter: '*',
strongDelimiter: '**',
linkStyle: 'inlined',
linkReferenceStyle: 'full',
br: ' ',
br: '\n',
preformattedCode: false,
blankReplacement: function (content, node) {
return node.isBlock ? '\n\n' : ''
Expand Down

0 comments on commit 21471d7

Please sign in to comment.