Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
beta.ordbok.uib.no
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
The upgrade at is complete, normal operation is resumed.
Show more breadcrumbs
Språksamlingane
beta.ordbok.uib.no
Commits
847487f0
Commit
847487f0
authored
3 years ago
by
Petr Kalashnikov
Browse files
Options
Downloads
Patches
Plain Diff
Fix pronunciation block
parent
b74f08fa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/DefElement.vue
+11
-2
11 additions, 2 deletions
src/components/DefElement.vue
with
11 additions
and
2 deletions
src/components/DefElement.vue
+
11
−
2
View file @
847487f0
...
...
@@ -18,6 +18,15 @@
import
entities
from
'
../utils/entities.js
'
import
helpers
from
'
../utils/helpers.js
'
function
replace_grammar_id
(
item
,
lang
)
{
let
content
=
item
.
content
if
(
content
.
includes
(
'
$
'
)
&&
(
item
.
items
[
0
].
id
)){
let
replacement_item
=
entities
[
lang
][
item
.
items
[
0
].
id
][
'
expansion
'
]
content
=
content
.
replace
(
'
$
'
,
replacement_item
)
}
return
content
}
export
default
{
name
:
'
DefElement
'
,
props
:
{
...
...
@@ -51,7 +60,7 @@ export default {
source
:
path
}
else
if
(
item
.
type_
==
'
pronunciation
'
)
return
{
type
:
item
.
type_
,
html
:
item
.
string
}
else
if
(
item
.
type_
==
'
pronunciation_guide
'
)
return
{
type
:
item
.
type_
,
html
:
item
.
stri
ng
}
else
if
(
item
.
type_
==
'
pronunciation_guide
'
)
return
{
type
:
'
pronunciation_guide
'
,
html
:
replace_grammar_id
(
item
,
la
ng
)
}
else
if
(
item
.
type_
==
'
superscript
'
)
return
{
type
:
item
.
type_
,
html
:
item
.
text
,
tag
:
'
sup
'
}
else
if
(
item
.
type_
==
'
subscript
'
)
return
{
type
:
item
.
type_
,
html
:
item
.
text
,
'
tag
'
:
'
sub
'
}
else
if
(
item
.
type_
==
'
quote_inset
'
)
return
{
type
:
item
.
type_
,
body
:
item
,
html
:
''
,
tag
:
'
DefElement
'
,
props
:
{
body
:
item
,
tag
:
'
i
'
,
dictionary
:
lang
}}
...
...
@@ -85,7 +94,7 @@ export default {
<!--
Add
"
scoped
"
attribute
to
limit
CSS
to
this
component
only
-->
<
style
scoped
>
.
usage
,
.
pronunciation
{
.
usage
,
.
pronunciation
_guide
{
font
-
style
:
italic
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment