Skip to content

Commit

Permalink
fix(lyricova): builds
Browse files Browse the repository at this point in the history
  • Loading branch information
blueset authored Sep 5, 2024
1 parent 86c439f commit 8999eaa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
18 changes: 8 additions & 10 deletions packages/lyricova/src/components/public/PlainTextHangingPunct.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Fragment, useEffect, useRef } from "react";
import classes from "./PlainTextHangingPunct.module.scss";
import { shiftinPuncts } from "src/utils/typography";
import { shiftinPuncts } from "../../utils/typography";

function CollapsedSpan({ children }: { children: string }) {
const ref = useRef<HTMLSpanElement>(null);
Expand Down Expand Up @@ -33,15 +33,13 @@ interface PlainTextHangingPunctProps {
export function PlainTextHangingPunct({
children,
}: PlainTextHangingPunctProps) {
const lines = children
.split("\n")
.map((line) => {
let match = line.match(/^([\p{Ps}\p{Pi}"]*)(.*?)(\p{Po}*)$/u);
match = shiftinPuncts(line, match, "「", "」");
match = shiftinPuncts(line, match, "『", "』");
match = shiftinPuncts(line, match, "「", "」");
return match;
});
const lines = children.split("\n").map((line) => {
let match = line.match(/^([\p{Ps}\p{Pi}"]*)(.*?)(\p{Po}*)$/u);
match = shiftinPuncts(line, match, "「", "」");
match = shiftinPuncts(line, match, "『", "』");
match = shiftinPuncts(line, match, "「", "」");
return match;
});
return (
<>
{lines.map((line, idx) => (
Expand Down
1 change: 1 addition & 0 deletions packages/lyricova/src/controllers/public.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ export class PublicApiController {
match = shiftinPuncts(line, match, "「", "」");
match = shiftinPuncts(line, match, "『", "』");
match = shiftinPuncts(line, match, "「", "」");
return match;
});

const [
Expand Down

0 comments on commit 8999eaa

Please sign in to comment.