diff --git a/README.md b/README.md index 9a791bb..8599c90 100644 --- a/README.md +++ b/README.md @@ -16,42 +16,52 @@ Inline local assets referenced in an HTML document. This: - var inlineHtml = require('inline-html'); - inlineHtml('path/to/file.html').then(function (html) { - ... - }); +```js +var inlineHtml = require('inline-html'); +inlineHtml('path/to/file.html').then(function (html) { + ... +}); +``` Turns this: - - -
- +```html + + +
+ +``` Into this: - - -
- +```html + + +
+ +``` Where: - `main.less` - @import (inline) 'main.css'; - div { background-image: url('path/to/file'); } +```css +@import (inline) 'main.css'; +div { background-image: url('path/to/file'); } +``` - `main.css` - @font-face { src: url('path/to/file'); } +```css +@font-face { src: url('path/to/file'); } +``` ## API