dedent icon indicating copy to clipboard operation
dedent copied to clipboard

⬅️ ES6 string tag that strips indentation from multi-line strings.

Results 28 dedent issues
Sort by recently updated
recently updated
newest added

There are several pull requests and unanswered issues. Is this project dead?

_Hijacked by @JoshuaKGoldberg on September 4th, 2023: see https://github.com/dmnd/dedent/issues/12#issuecomment-1705819025. Now accepting PRs for a `dedent({ recursive: true })` option._ --- ```jsx const a = dedent` hello world `; const b...

type: feature
status: accepting prs

- Upgraded dependencies - Fixed the macro - Fixed publish configs to includes macro as well - Added TypeScript declaration files - Made it leaves Flow type definitions as comments...

``` $ node > dedent = require(".").default [Function: dedent] > `a\xa0\tb` 'a \tb' > dedent`a\xa0b` 'a\\xa0\\tb' > ⏎ ``` (For people stumbling upon this issue: https://github.com/MartinKolarik/dedent-js might work better for...

type: bug
status: accepting prs

Started here https://github.com/indentjs/endent/issues/8 More details here https://github.com/prisma/nexus-prisma/issues/50 The issue is that if `\n` shows up in a template string it gets read as a newline.

This PR fixes start and end trimming by only trimming one newline each. This enables us to create real newlines instead of explicit newlines (those are removed), so the strings...

This is a basic implementation to allow tab usage. I handle each tab like a single space character. In most cases this should be fine as it's really rare that...

Because there are currently problems when importing the library via require.

As currently written, this module performs interpolation before stripping leading whitespace. In particular, whitespace is stripped from the interpolated components. I think that this is the wrong behavior. My understanding...