Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: prettier/plugin-xml
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.0.0
Choose a base ref
...
head repository: prettier/plugin-xml
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.0.1
Choose a head ref
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on Mar 22, 2022

  1. Fixes #422

    kddnewton committed Mar 22, 2022
    Copy the full SHA
    fd3fff6 View commit details
  2. Copy the full SHA
    65fd734 View commit details
  3. Bump to v2.0.1

    kddnewton committed Mar 22, 2022
    Copy the full SHA
    1455dbc View commit details
Showing with 10 additions and 3 deletions.
  1. +8 −1 CHANGELOG.md
  2. +1 −1 package.json
  3. +1 −1 src/printer.ts
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a

## [Unreleased]

## [2.0.1] - 2022-03-22

### Added

- Better idempotency when printing long strings of text content within elements with ignored whitespace.

## [2.0.0] - 2022-03-22

### Changed
@@ -173,7 +179,8 @@ and it will maintain your formatting.

- Initial release 🎉

[unreleased]: https://github.com/prettier/plugin-xml/compare/v2.0.0...HEAD
[unreleased]: https://github.com/prettier/plugin-xml/compare/v2.0.1...HEAD
[2.0.1]: https://github.com/prettier/plugin-xml/compare/v2.0.0...v2.0.1
[2.0.0]: https://github.com/prettier/plugin-xml/compare/v1.2.0...v2.0.0
[1.2.0]: https://github.com/prettier/plugin-xml/compare/v1.1.0...v1.2.0
[1.1.0]: https://github.com/prettier/plugin-xml/compare/v1.0.2...v1.1.0
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prettier/plugin-xml",
"version": "2.0.0",
"version": "2.0.1",
"description": "prettier plugin for XML",
"main": "dist/plugin.js",
"scripts": {
2 changes: 1 addition & 1 deletion src/printer.ts
Original file line number Diff line number Diff line change
@@ -326,7 +326,7 @@ const printer: Printer = {

return fill(
value
.split(/( )/g)
.split(/\b( +)\b/g)
.map((segment, index) =>
index % 2 === 0 ? segment : line
)