Skip to content

Commit

Permalink
tests and docs for xmlMode, bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
jrit committed May 21, 2015
1 parent f90942a commit d3dfb48
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 1 deletion.
5 changes: 5 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
1.2.0 / 2015-05-21
==================

* Add `xmlMode` option

1.1.2 / 2015-05-08
==================

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ All juice methods take an options object that can contain any of these propertie
* `applyAttributesTableElements` - whether to create attributes for styles in `juice.styleToAttribute` on elements set in `juice.tableElements`. Defaults to `false`.
* `webResources` - An options object that will be passed to [web-resource-inliner](https://www.npmjs.com/package/web-resource-inliner) for juice functions that will get remote resources (`juiceResources` and `juiceFile`). Defaults to `{}`.
* `inlinePseudoElements` - Whether to insert pseudo elements (`::before` and `::after`) as `<span>` into the DOM. *Note*: Inserting pseudo elements will modify the DOM and may conflict with CSS selectors elsewhere on the page (e.g., `:last-child`).
* `xmlMode` - whether to output XML/XHTML with all tags closed. Note that the input *must* also be valid XML/XHTML or you will get undesirable results. Defaults to `false`.

### Methods

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "juice",
"version": "1.1.2",
"version": "1.2.0",
"description": "Inlines css into html source",
"bin": "./bin/juice",
"main": "./lib/juice",
Expand Down
Empty file.
9 changes: 9 additions & 0 deletions test/cases/juice-content/xml.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<html>
<head>
<meta name="name" content="value" />
</head>
<body>
hello<br />
<img src="" />
</body>
</html>
4 changes: 4 additions & 0 deletions test/cases/juice-content/xml.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"url": "./",
"xmlMode": true
}
9 changes: 9 additions & 0 deletions test/cases/juice-content/xml.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<html>
<head>
<meta name="name" content="value"/>
</head>
<body>
hello<br/>
<img src=""/>
</body>
</html>

0 comments on commit d3dfb48

Please sign in to comment.