Skip to content

Commit

Permalink
tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
viqueen committed Oct 2, 2024
1 parent 4721af2 commit d23f379
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = {
'error',
{
license: 'Apache-2.0',
copyRightYear: '2023',
copyRightYear: '2024',
copyRightName: 'Hasnae Rehioui',
},
],
Expand Down
15 changes: 0 additions & 15 deletions modules/cli/clients/confluence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,6 @@ import axios from 'axios';
import { confluenceApi } from '../../apis';
import { environment } from '../conf';

/**
* Copyright 2023 Hasnae Rehioui
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const confluenceClient = () => {
const siteName = environment.CONFLUENCE_SITE_NAME;
const username = environment.CONFLUENCE_USERNAME;
Expand Down
2 changes: 1 addition & 1 deletion modules/cli/commands/extract/extract-assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const fetchEmoji = async (
) => {
const targetFile = path.resolve(output.assets.emojis, `${id}.png`);
if (fs.existsSync(targetFile)) return;
if (RegExp(UUID_REGEX).exec(id)) return;
if (UUID_REGEX.exec(id)) return;

const targetUrl = id.startsWith('atlassian')
? `/atlassian/${id.split('-')[1]}_64.png`
Expand Down
4 changes: 2 additions & 2 deletions modules/cli/commands/extract/helpers/rewrite-url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ export const rewriteUrl = (url: string): string => {
if (!isInternalUrl(url)) {
return url;
}
const isBlog = url.match(blogUrl);
const isBlog = blogUrl.exec(url);
if (isBlog) {
return `${environment.TARGET_SITE}/articles/${isBlog.groups?.id}/`;
}
const isPage = url.match(pageUrl);
const isPage = pageUrl.exec(url);
if (isPage) {
return `${environment.TARGET_SITE}/notes/${isPage.groups?.id}/`;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ type WidgetConnectorMacroProps = {

const SPOTIFY_TRACK =
/^https:\/\/open\.spotify\.com\/track\/(?<trackId>[a-zA-Z0-9]+)(\?.*)?$/;
const YOUTUBE_VIDEO =
/^https:\/\/www\.youtube\.com\/watch\?v=(?<videoId>[\w]+)$/;
const YOUTUBE_VIDEO = /^https:\/\/www\.youtube\.com\/watch\?v=(?<videoId>\w+)$/;

const SpotifyEmbed = (props: { trackId?: string }) => {
const { trackId } = props;
Expand All @@ -31,11 +30,11 @@ const SpotifyEmbed = (props: { trackId?: string }) => {
return (
<div style={{ textAlign: 'center' }}>
<iframe
style={{ borderRadius: 12 }}
style={{ borderRadius: 12, border: 'none' }}
src={embedUrl}
width="50%"
height="380"
frameBorder="0"
title={trackId}
allowFullScreen={false}
allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture"
/>
Expand Down

0 comments on commit d23f379

Please sign in to comment.