Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ESSIF-Lab
eSSIF-Lab framework
Commits
1a7f735f
Commit
1a7f735f
authored
Oct 09, 2020
by
Maria Iliadi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Parse: remove popup attr, if hoverText is undefined
parent
90403e13
Pipeline
#15668
passed with stage
in 1 minute and 23 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
plugins/terminology-parser/index.js
plugins/terminology-parser/index.js
+7
-2
No files found.
plugins/terminology-parser/index.js
View file @
1a7f735f
...
...
@@ -84,8 +84,13 @@ async function parser(err, files) {
const
current_file_path
=
path
.
resolve
(
process
.
cwd
(),
filepath
);
const
term_path
=
path
.
resolve
(
process
.
cwd
(),
TERMS_DIR
,
reference
);
const
new_final_url
=
getRelativePath
(
current_file_path
,
term_path
);
var
new_text
=
(
'
<Term popup="
'
+
hoverText
+
'
" reference="
'
+
new_final_url
+
'
">
'
+
text
+
'
</Term>
'
);
if
(
hoverText
===
undefined
)
{
var
new_text
=
(
'
<Term reference="
'
+
new_final_url
+
'
">
'
+
text
+
'
</Term>
'
);
}
else
{
var
new_text
=
(
'
<Term popup="
'
+
hoverText
+
'
" reference="
'
+
new_final_url
+
'
">
'
+
text
+
'
</Term>
'
);
}
content
=
content
.
replace
(
regex_match
,
new_text
);
}
// Find the index of the 2nd occurrence of '---'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment