Skip to content

Commit

Permalink
Merge branch 'fix/trailing-dots-in-links' into 'main'
Browse files Browse the repository at this point in the history
fix(frontend): trailing dots in links

Closes #16

See merge request m-team/ai/cookiecutter-web!12
  • Loading branch information
BorjaEst committed Sep 23, 2024
2 parents 6d4a18b + b64dc4b commit 816e3e8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18 as git-version
FROM node:18 AS git-version

WORKDIR /app
COPY lib lib
Expand All @@ -8,7 +8,7 @@ COPY ["package.json", "yarn.lock", "next.config.js", "tsconfig.json", ".eslintrc
#COPY .git/ ./.git/
#RUN yarn git-info

FROM node:18 as base
FROM node:18 AS base
# new base because we don't want .git

WORKDIR /app
Expand All @@ -28,7 +28,7 @@ WORKDIR /app/lib/client
RUN npm run build
WORKDIR /app

FROM base as prod-build
FROM base AS prod-build
# relative
ARG BACKEND_URL
ENV NEXT_PUBLIC_API_HOST=${BACKEND_URL}
Expand All @@ -45,7 +45,7 @@ ENV NEXT_PUBLIC_FORCED_TAGS=${FORCED_TAGS}

RUN yarn build

FROM node:18-alpine as production
FROM node:18-alpine AS production
ENV NODE_ENV=production

WORKDIR /app
Expand All @@ -59,7 +59,7 @@ COPY --from=prod-build /app/.next/standalone ./
EXPOSE 3000
CMD ["node", "server.js"]

FROM base as development
FROM base AS development
ENV NODE_ENV=development

EXPOSE 3000
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/ClickableLinks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const ClickableLinks: FC<ClickableLinksProps> = ({ text }) => (
<span
dangerouslySetInnerHTML={{
__html: text.replaceAll(
/(https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&//=]*))/g,
/(https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&//=]*[-a-zA-Z0-9()@:%_+~#?&//=]))/g,
'<a href="$1">$1</a>'
),
}}
Expand Down

0 comments on commit 816e3e8

Please sign in to comment.