Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vitorluizc/gulp-html-accents

Encodes accents and other diacritics into HTML Entities.
https://github.com/vitorluizc/gulp-html-accents

encode gulp html html-entities javascript replace-accents

Last synced: about 5 hours ago
JSON representation

Encodes accents and other diacritics into HTML Entities.

Awesome Lists containing this project

README

        

# gulp-html-accents

[![Greenkeeper badge](https://badges.greenkeeper.io/VitorLuizC/gulp-html-accents.svg)](https://greenkeeper.io/)
[![Build Status](https://travis-ci.org/VitorLuizC/gulp-html-accents.svg?branch=master)](https://travis-ci.org/VitorLuizC/gulp-html-accents)

Encodes accents and other diacritics to HTML Entities using [`he`](https://www.npmjs.com/package/he).

```html

Olá, tudo bem com você?


```

encodes to

```html

Olá, tudo bem com você?


```

## Usage
Like any other _gulp plugin_.

```js
const gulp = require('gulp');
const accents = require('gulp-html-accents');

gulp.task('process:html', () => {
gulp.src('./src/index.html')
.pipe(accents(/* he.encode options */))
.pipe(gulp.dest('./dist'));
});
```

## Options

`gulp-html-accents` can, optionally, receives [`he.encode` options](https://github.com/mathiasbynens/he#heencodetext-options) as argument.