Skip to content
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

Use "property" instead of "rel" where appropriate; fixes #188 #191

Merged
merged 1 commit into from
Oct 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/components/LicenseCode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
<span v-if="!workTitle">{{ $t('license-use.richtext.workTitle') }}</span>
<span
v-else
rel="dct:title"
property="dct:title"
>
{{ workTitle }}
</span>
</a>
<span
v-else-if="workTitle"
rel="dct:title"
property="dct:title"
>
{{ workTitle }}
</span>
Expand Down Expand Up @@ -100,7 +100,7 @@ export default {
},
creatorSpan() {
if (this.creatorName) {
return `<span rel="cc:attributionName">${this.creatorName}</span>`
return `<span property="cc:attributionName">${this.creatorName}</span>`
} else return ''
},
creatorName() {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/license-utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ function generateHTML(attributionDetails, shortLicenseName) {
if (workUrl) {
dataForHtmlGeneration.workTitle = `<a rel="cc:attributionURL" property="dct:title" href="${workUrl}">${workTitle}</a>`
} else {
dataForHtmlGeneration.workTitle = `<span rel="dct:title">${workTitle}</span>`
dataForHtmlGeneration.workTitle = `<span property="dct:title">${workTitle}</span>`
}
}
return dataForHtmlGeneration
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/specs/components/LicenseCode.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ describe('LicenseCode.vue', () => {
})
it('Check if the creatorSpan function returns the correct text', () => {
state.attributionDetails.creatorName = 'J Doe'
expect(wrapper.vm.creatorSpan).toBe('<span rel="cc:attributionName">J Doe</span>')
expect(wrapper.vm.creatorSpan).toBe('<span property="cc:attributionName">J Doe</span>')
})
it('Check if the creatorName function returns the correct text', () => {
state.attributionDetails.creatorName = 'J Doe'
Expand Down
Loading