Comments (4)
Presumably ignoring whichever wasn't at the start of the line would be sane behavior. :)
from dedent.
I don't use tabs, but PRs welcome. Though I wonder what the expected behaviour is when tabs and spaces are mixed.
from dedent.
Hi, I ran into the issue that this library still isn't supporting tabs. I did some research with the result that packages like outdent are handling tabs like a single space character. This makes the implementation really simple. In most cases there are no mixed spaces/tabs and if there are and we would handle tabs like spaces, we have an equally broken result as we would encounter with the current implementation (since spaces are trimmed, but tabs are still there).
I will try to implement this and open a pull request, if you are still fine with that @dmnd.
from dedent.
Fixed by #28! 🎉
I'll try to release a beta version soon. #36
from dedent.
Related Issues (20)
- CommonJS breakage: many consumers still use dedent = require("dedent")
- Should only trim one newline at start and end so that you can add custom newlines HOT 5
- 1.0.1 type change HOT 1
- escaped `$` and `{` characters are not handled correctly HOT 3
- `babel-plugin-macros` should be an optional peer dependency HOT 1
- Add a changelog HOT 5
- Convert dedent.ts and tests to TypeScript
- Convert macro.js to TypeScript
- Onboard to create-typescript-app@1 HOT 1
- Node ESM compatibility issue HOT 2
- 🚀 Feature: Add an option to disable special character escaping HOT 2
- Avoid escaping $ without a { after it? HOT 1
- dedent.d.mts missing in package.json > files
- Consider being `String.dedent` HOT 3
- Bug(?) JSON.serialize(..., null, 2) throws off indentation HOT 2
- error with npm install on firebase project HOT 1
- 🛠 Tooling: Set up tokens for automated publishing & contributor recognition
- 🐛 Bug: Doesn't do dedent if first character is a space character HOT 2
- 📝 Docs: add an 'install' section to the README? HOT 5
- 🛠 Tooling: Build failures on main from references to yarn HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dedent.