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

fix: continue to upload assets job even if npm publish step fails #1638

Merged
Prev Previous commit
Next Next commit
refactorings
  • Loading branch information
Sergio Alvarenga committed Nov 18, 2024
commit a0c86a0dd068fe46bb9592a2d0a03dd8b5d41bf8
6 changes: 3 additions & 3 deletions packages/plugins/src/menu/Help.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { openSCDIcon } from '@openscd/open-scd/src/icons/icons.js';
import { Directory } from '@openscd/open-scd/src/finder-list.js';

const GITHUB_WIKI_LINK_PATTERN = /https:\/\/github\.com\/openscd\/open-scd\/wiki\/([^)]*)/g;
const MD_LINK_TITLE_PATTERN =/[^\\]]*/;
const MD_LINK_TITLE_PATTERN ='([^\\]]*)';
const HYPHEN_PATTERN = /-/g;

function aboutBox(version: string) {
Expand Down Expand Up @@ -49,9 +49,9 @@ async function getLinkedPages(path: string[]): Promise<Directory> {
const page = path[path.length - 1].replace(/ /g, '-');
const res = await fetch(`/openscd/public/md/${page}.md`);
const md = await res.text();
const MD_LINK_REPLACEMENT = `<a style="cursor: help; color: var(--mdc-theme-primary)" href="https://github.com/openscd/open-scd/wiki/$2" target="_blank">$1</a>`
const MD_LINK_REPLACEMENT = `<a style="cursor: help; color: var(--mdc-theme-primary)" href="https://github.com/openscd/open-scd/wiki/$2" target="_blank" >$1</a>`
const unlinkedMd = md.replace(
new RegExp(`\\[(${MD_LINK_TITLE_PATTERN.source})\\]\\(${GITHUB_WIKI_LINK_PATTERN.source}\\)`, 'g'),
new RegExp(`\\[${MD_LINK_TITLE_PATTERN}\\]\\(${GITHUB_WIKI_LINK_PATTERN.source}\\)`, 'g'),
MD_LINK_REPLACEMENT
);

Expand Down