Skip to content

Commit 76670bb

Browse files
set baseline space for licenseShort props setting
1 parent 312fcba commit 76670bb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/scripts.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,14 @@ function setStateProps(index, state) {
140140
}
141141
});
142142

143-
// set full license human readable name && full license URL
143+
// set licenseFull, licenseShort, licenseURL
144144
if (state.props.license != 'unknown' | state.props.license != 'cc-0' ) {
145145

146146
formattedLicense = state.props.license.replace(/-/, ' ').toUpperCase();
147147
state.props.licenseFull = formattedLicense + ' 4.0';
148148

149+
// set licenseShort
150+
149151
shortName = state.props.license.replace(/cc-/, '');
150152
state.props.licenseURL = 'https://creativecommons.org/licenses/'+ shortName +'/4.0/';
151153
}
@@ -154,6 +156,8 @@ function setStateProps(index, state) {
154156

155157
state.props.licenseFull = 'CC0 1.0';
156158

159+
// set licenseShort
160+
157161
state.props.licenseURL = 'https://creativecommons.org/publicdomain/zero/1.0/';
158162
}
159163

0 commit comments

Comments
 (0)