Skip to content

Commit

Permalink
fix(fmt): Correctly format hard breaks in markdown (denoland#9742)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Mar 10, 2021
1 parent 88a7fa3 commit 3ab4886
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 21 deletions.
13 changes: 7 additions & 6 deletions .dprintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
"$schema": "https://dprint.dev/schemas/v0.json",
"projectType": "openSource",
"incremental": true,
"lineWidth": 80,
"indentWidth": 2,
"typescript": {
"deno": true
},
"markdown": {
"textWrap": "always"
"deno": true
},
"json": {
"deno": true
},
"includes": ["**/*.{ts,tsx,js,jsx,json,md}"],
"excludes": [
Expand All @@ -34,8 +35,8 @@
"tools/wpt/manifest.json"
],
"plugins": [
"https://plugins.dprint.dev/typescript-0.40.3.wasm",
"https://plugins.dprint.dev/json-0.8.0.wasm",
"https://plugins.dprint.dev/markdown-0.5.1.wasm"
"https://plugins.dprint.dev/typescript-0.41.0.wasm",
"https://plugins.dprint.dev/json-0.9.0.wasm",
"https://plugins.dprint.dev/markdown-0.6.0.wasm"
]
}
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ base64 = "0.13.0"
byteorder = "1.4.2"
clap = "2.33.3"
dissimilar = "1.0.2"
dprint-plugin-json = "0.9.0"
dprint-plugin-markdown = "0.6.0"
dprint-plugin-typescript = "0.41.0"
dprint-plugin-markdown = "0.5.1"
dprint-plugin-json = "0.8.0"
encoding_rs = "0.8.28"
env_logger = "0.8.2"
filetime = "0.2.14"
Expand Down
6 changes: 1 addition & 5 deletions cli/tools/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,7 @@ fn get_typescript_config(
fn get_markdown_config() -> dprint_plugin_markdown::configuration::Configuration
{
dprint_plugin_markdown::configuration::ConfigurationBuilder::new()
// Matches `.dprintrc.json` in the repository
.text_wrap(dprint_plugin_markdown::configuration::TextWrap::Always)
.ignore_directive("deno-fmt-ignore")
.ignore_start_directive("deno-fmt-ignore-start")
.ignore_end_directive("deno-fmt-ignore-end")
.deno()
.build()
}

Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started/webassembly.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Deno can execute [WebAssembly](https://webassembly.org/) modules with the same
interfaces that
[browsers provide](https://developer.mozilla.org/en-US/docs/WebAssembly).

<!-- dprint-ignore -->
<!-- deno-fmt-ignore -->

```ts
const wasmCode = new Uint8Array([
Expand Down
2 changes: 1 addition & 1 deletion docs/tools/script_installer.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ idiom to specify the entry point in an executable script.

Example:

<!-- dprint-ignore -->
<!-- deno-fmt-ignore -->

```ts
// https://example.com/awesome/cli.ts
Expand Down

0 comments on commit 3ab4886

Please sign in to comment.