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(guide): better position parsing including unicode special characters #53

Merged
merged 2 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/hungry-toes-complain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ganymede-app": patch
---

Un problème persistait concernant les positions, entraînant la disparition de certains caractères spéciaux dans le contenu des guides. Ce problème est corrigé.
2 changes: 1 addition & 1 deletion src/components/guide-frame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function GuideFrame({
return <Trans>lien masqué</Trans>
}

const posReg = /(.*?)\[\s*(-?\d+)\s*,\s*(-?\d+)\s*]([\w\s]*)/g
const posReg = /(.*?)\[\s*(-?\d+)\s*,\s*(-?\d+)\s*\]([(?:\w|\p{L})\s]*)/gu

let elems: ReactNode[] = []

Expand Down
2 changes: 1 addition & 1 deletion src/ipc/bindings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export type TauRpcUpdateApiOutputTypes = { proc_name: "startUpdate"; output_type

export type User = { id: number; name: string; is_admin: number; is_certified: number }

const ARGS_MAP = {'conf':'{"reset":[],"get":[],"set":["conf"],"toggleGuideCheckbox":["guide_id","step_index","checkbox_index"]}', 'update':'{"startUpdate":[]}', 'security':'{"getWhiteList":[]}', 'base':'{"openUrl":["url"],"newId":[]}', 'almanax':'{"get":[]}', 'guides':'{"openGuidesFolder":[],"downloadGuideFromServer":["guide_id","folder"],"getGuides":["folder"],"getGuideFromServer":["guide_id"],"getFlatGuides":["folder"],"getGuidesFromServer":["status"]}', '':'{"isAppVersionOld":[]}', 'image':'{"fetchImage":["url"]}'}
const ARGS_MAP = {'':'{"isAppVersionOld":[]}', 'image':'{"fetchImage":["url"]}', 'guides':'{"openGuidesFolder":[],"downloadGuideFromServer":["guide_id","folder"],"getGuides":["folder"],"getGuideFromServer":["guide_id"],"getFlatGuides":["folder"],"getGuidesFromServer":["status"]}', 'conf':'{"reset":[],"get":[],"set":["conf"],"toggleGuideCheckbox":["guide_id","step_index","checkbox_index"]}', 'update':'{"startUpdate":[]}', 'security':'{"getWhiteList":[]}', 'almanax':'{"get":[]}', 'base':'{"openUrl":["url"],"newId":[]}'}
import { createTauRPCProxy as createProxy } from "taurpc"

export const createTauRPCProxy = () => createProxy<Router>(ARGS_MAP)
Expand Down