gulp-anchor-including-block-validator

0.0.5 • Public • Published

gulp-anchor-including-block-validator

npm version

simple strange validator. if html has anchor tag including block level elements, an error is returned. like the rules of xhtml.

target of block level elements

address, article, aside, blockquote, details, dialog, dd, div, dl, dt, fieldset, figcaption, figure, footer, form, h1, h2, h3, h4, h5, h6, header, hgroup, hr, li, main, nav, ol, p, pre, section, table, ul

install

$ npm install gulp-anchor-including-block-validator

basic usage

'use strict';

var gulp   = require('gulp');
var anchor = require('gulp-anchor-including-block-validator');

gulp.task('default',function(){
  return gulp.src(['sample/*'])
    .pipe(anchor());
});

error of sample

if you check sample.html.

Message:
    WARNING A TAG : <a href="#"><div class="test">NG</div></a>

options

if you want to add a target elements.

gulp.task('default',function(){
  return gulp.src(['sample/*'])
    .pipe(anchor('label|picture'));
});

Package Sidebar

Install

npm i gulp-anchor-including-block-validator

Weekly Downloads

0

Version

0.0.5

License

MIT

Unpacked Size

10.8 kB

Total Files

14

Last publish

Collaborators

  • hirosco