-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extracted iev-data functionality and add it to iev #31
Conversation
text.gsub( | ||
/<a href="?(IEV)\s*(\d\d\d-\d\d-\d\d\d?)"?>(.*?)<\/?a>/, | ||
'{{\3, \1:\2}}', | ||
).gsub( | ||
/<a href="?\s*(\d\d\d-\d\d-\d\d\d?)"?>(.*?)<\/?a>/, | ||
'{{\3, IEV:\2}}', | ||
).gsub( | ||
# To handle <a> tags without ending tag like | ||
# `Voir <a href=IEV103-05-21>IEV 103-05-21` | ||
# for concept '702-03-11' in `fr` | ||
/<a href="?(IEV)?\s*(\d\d\d-\d\d-\d\d\d?)"?>(.*?)$/, | ||
'{{\3, IEV:\2}}', | ||
).gsub( | ||
/<a href="?(.*?)"?>(.*?)<\/a>/, | ||
'\1[\2]', | ||
).gsub( | ||
Regexp.new([SIMG_PATH_REGEX, "\\s*", FIGURE_TWO_REGEX].join), | ||
"#{IMAGE_PATH_PREFIX}/#{term_domain}/\\1[Figure \\2 - \\3; \\6]", | ||
).gsub( | ||
Regexp.new([SIMG_PATH_REGEX, "\\s*", FIGURE_ONE_REGEX].join), | ||
"#{IMAGE_PATH_PREFIX}/#{term_domain}/\\1[Figure \\2 - \\3]", | ||
).gsub( | ||
/<img\s+(.+?)\s*>/, | ||
"#{IMAGE_PATH_PREFIX}/#{term_domain}/\\1[]", | ||
).gsub( | ||
/<br>/, | ||
"\n", | ||
).gsub( | ||
/<b>(.*?)<\/b>/, | ||
"*\\1*", | ||
) |
Check failure
Code scanning / CodeQL
Polynomial regular expression used on uncontrolled data High
regular expression
library input
This
regular expression
library input
This
regular expression
library input
text.gsub( | ||
/<a href="?(IEV)\s*(\d\d\d-\d\d-\d\d\d?)"?>(.*?)<\/?a>/, | ||
'{{\3, \1:\2}}', | ||
).gsub( | ||
/<a href="?\s*(\d\d\d-\d\d-\d\d\d?)"?>(.*?)<\/?a>/, | ||
'{{\3, IEV:\2}}', | ||
).gsub( | ||
# To handle <a> tags without ending tag like | ||
# `Voir <a href=IEV103-05-21>IEV 103-05-21` | ||
# for concept '702-03-11' in `fr` | ||
/<a href="?(IEV)?\s*(\d\d\d-\d\d-\d\d\d?)"?>(.*?)$/, | ||
'{{\3, IEV:\2}}', | ||
).gsub( | ||
/<a href="?(.*?)"?>(.*?)<\/a>/, | ||
'\1[\2]', | ||
).gsub( | ||
Regexp.new([SIMG_PATH_REGEX, "\\s*", FIGURE_TWO_REGEX].join), | ||
"#{IMAGE_PATH_PREFIX}/#{term_domain}/\\1[Figure \\2 - \\3; \\6]", | ||
).gsub( | ||
Regexp.new([SIMG_PATH_REGEX, "\\s*", FIGURE_ONE_REGEX].join), | ||
"#{IMAGE_PATH_PREFIX}/#{term_domain}/\\1[Figure \\2 - \\3]", | ||
).gsub( | ||
/<img\s+(.+?)\s*>/, | ||
"#{IMAGE_PATH_PREFIX}/#{term_domain}/\\1[]", | ||
).gsub( |
Check failure
Code scanning / CodeQL
Polynomial regular expression used on uncontrolled data High
regular expression
library input
This
regular expression
library input
This
regular expression
library input
This
regular expression
library input
This
regular expression
library input
This
regular expression
library input
text.gsub( | ||
/<a href="?(IEV)\s*(\d\d\d-\d\d-\d\d\d?)"?>(.*?)<\/?a>/, | ||
'{{\3, \1:\2}}', | ||
).gsub( | ||
/<a href="?\s*(\d\d\d-\d\d-\d\d\d?)"?>(.*?)<\/?a>/, | ||
'{{\3, IEV:\2}}', | ||
).gsub( | ||
# To handle <a> tags without ending tag like | ||
# `Voir <a href=IEV103-05-21>IEV 103-05-21` | ||
# for concept '702-03-11' in `fr` | ||
/<a href="?(IEV)?\s*(\d\d\d-\d\d-\d\d\d?)"?>(.*?)$/, | ||
'{{\3, IEV:\2}}', | ||
).gsub( | ||
/<a href="?(.*?)"?>(.*?)<\/a>/, | ||
'\1[\2]', | ||
).gsub( |
Check failure
Code scanning / CodeQL
Polynomial regular expression used on uncontrolled data High
regular expression
library input
text.gsub( | ||
/<a href="?(IEV)\s*(\d\d\d-\d\d-\d\d\d?)"?>(.*?)<\/?a>/, | ||
'{{\3, \1:\2}}', | ||
).gsub( | ||
/<a href="?\s*(\d\d\d-\d\d-\d\d\d?)"?>(.*?)<\/?a>/, | ||
'{{\3, IEV:\2}}', | ||
).gsub( | ||
# To handle <a> tags without ending tag like | ||
# `Voir <a href=IEV103-05-21>IEV 103-05-21` | ||
# for concept '702-03-11' in `fr` | ||
/<a href="?(IEV)?\s*(\d\d\d-\d\d-\d\d\d?)"?>(.*?)$/, | ||
'{{\3, IEV:\2}}', | ||
).gsub( |
Check failure
Code scanning / CodeQL
Polynomial regular expression used on uncontrolled data High
regular expression
library input
text.gsub( | ||
/<a href="?(IEV)\s*(\d\d\d-\d\d-\d\d\d?)"?>(.*?)<\/?a>/, | ||
'{{\3, \1:\2}}', | ||
).gsub( | ||
/<a href="?\s*(\d\d\d-\d\d-\d\d\d?)"?>(.*?)<\/?a>/, | ||
'{{\3, IEV:\2}}', | ||
).gsub( |
Check failure
Code scanning / CodeQL
Polynomial regular expression used on uncontrolled data High
regular expression
library input
text.gsub( | ||
/<a href="?(IEV)\s*(\d\d\d-\d\d-\d\d\d?)"?>(.*?)<\/?a>/, | ||
'{{\3, \1:\2}}', | ||
).gsub( |
Check failure
Code scanning / CodeQL
Polynomial regular expression used on uncontrolled data High
regular expression
library input
input.gsub('\n', "\n\n") | ||
.gsub(/<[pbr]+>/, "\n\n") | ||
.gsub(/\s*\n[\n\s]+/, "\n\n") |
Check failure
Code scanning / CodeQL
Polynomial regular expression used on uncontrolled data High
regular expression
library input
This
regular expression
library input
This
regular expression
library input
The comments are related to I have tested it on the actual data file from The test cases that are failing are on windows and are failing because of |
Move all three commands (
xlsx2yaml
,xlsx2db
,db2yaml
) fromiev-data
toiev
and useglossarist V2
for reading and writing concept toYAML
files.closes #30