posthtml-render icon indicating copy to clipboard operation
posthtml-render copied to clipboard

singleTags won't work regular expression

Open Scrum opened this issue 5 years ago • 0 comments

@gucong3000 Hi, singleTags options can also take regular expression see

As a result, your settings should come down to

{
  closingSingleTag: 'slash' ,
  singleTags: [ /<\s*[^>]*\/>/ ]
}

@Scrum This won't work, since regular expression only check tag name.

Originally posted by @yangmingshan in https://github.com/posthtml/posthtml/issues/221#issuecomment-652861246

Scrum avatar Jul 02 '20 08:07 Scrum