Enable to mask texts (#73)
* chore: reorder options * feat: enable to mask texts * feat: add the default mask function * refactor: rename options to identify the difference between mask text and mask input * test: add tests about masking
This commit is contained in:
@@ -202,6 +202,21 @@ exports[`[html file]: invalid-tagname.html 1`] = `
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`[html file]: mask-text.html 1`] = `
|
||||
"<!DOCTYPE html><html xmlns=\\"http://www.w3.org/1999/xhtml\\" lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
|
||||
<title>Document</title>
|
||||
</head> <body>
|
||||
<p class=\\"rr-mask\\">**** *</p>
|
||||
<div class=\\"rr-mask\\">
|
||||
<span>**** *</span>
|
||||
</div>
|
||||
<div class=\\"rr-mask\\">**** *</div>
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`[html file]: picture.html 1`] = `
|
||||
"<html xmlns=\\"http://www.w3.org/1999/xhtml\\"><head></head><body>
|
||||
<picture>
|
||||
|
||||
17
test/html/mask-text.html
Normal file
17
test/html/mask-text.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
||||
<title>Document</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<p class="rr-mask">mask 1</p>
|
||||
<div class="rr-mask">
|
||||
<span>mask 2</span>
|
||||
</div>
|
||||
<div class="rr-mask">mask 3</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user