Skip to content

Commit a39e8f4

Browse files
committed
use xfun::strip_html()
1 parent 8442b5a commit a39e8f4

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Imports:
6565
knitr (>= 1.38),
6666
rmarkdown (>= 2.14),
6767
jquerylib,
68-
xfun (>= 0.29),
68+
xfun (>= 0.39),
6969
tinytex (>= 0.12),
7070
yaml (>= 2.1.19)
7171
Suggests:

R/utils.R

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,10 +262,7 @@ clean_meta = function(meta_file, files) {
262262

263263
# remove HTML tags and remove extra spaces
264264
strip_html = function(x) {
265-
x = gsub('<!--.*?-->', '', x) # remove comments
266-
x = gsub('<[^>]+>', '', x)
267-
x = gsub('\\s{2,}', ' ', x)
268-
x
265+
gsub('\\s{2,}', ' ', xfun::strip_html(x))
269266
}
270267

271268
# remove the <script><script> content and references

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy