Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

fix(@angular-devkit/schematics): add support for BOM to UpdateRecorder #862

Merged
merged 1 commit into from
May 9, 2018

Conversation

hansl
Copy link
Contributor

@hansl hansl commented May 8, 2018

super(entry);
}

insertLeft(index: number, content: Buffer | string) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is index in terms of byte offsets or character offsets? Also is the string for content converted into the encoding specified by the BOM? It might be useful longer term to have both a BinaryUpdateRecorder and TextUpdateRecorder.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed. Right now it's in term of binary offset. I'm still unsure how we want to approach this problem.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need an UpdateBuffer that supports text instead of buffers. That's not a huuuuge challenge, but something we should defer to the libraries (maybe?).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants