Comments (1)
I've decided that a full proof solution to this problem would impact the performance too much. This kind of enhancement is best left to code formatters and code block writer should be viewed as a printer instead.
For example, the solution I was thinking of would be to redesign this library to be completely lazy and construct a tree. Then at the end, the tree would be evaluated to decide how newlines should occur. Yeah, no way that's going to be fast and the consuming code would be very complicated.
Closing this.
from code-block-writer.
Related Issues (20)
- Ability to write with a hanging indent HOT 1
- Error when running `yarn test` HOT 1
- Performance: Move regex to be static
- Add closeComment()
- Add `indent(times)`
- Improve Performance HOT 1
- isLastBlankLine() and getLength() should not call toString() HOT 1
- Add method for iterating over the previously written characters
- Should not push empty strings onto internal array
- Add insert method HOT 2
- Rename `withHangingIndentation` to `hangingIndent` HOT 1
- Stays in string even after newline?
- Release for Deno HOT 1
- Declaration and capturing of variables HOT 1
- getBaseTypes() and getBaseClass() not working HOT 2
- Property generic types
- TypeScript error TS2351: This expression is not constructable. HOT 11
- TypeError: CodeBlockWriter is not a constructor HOT 2
- Suggestion: writer.pairedWrite(startToken, endToken, newLine, indent, block: () => void)
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 code-block-writer.