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

행사 등록 > 마크다운 등록 > 태그 등록 #168

Open
KoEonYack opened this issue Jan 11, 2025 · 0 comments
Open

행사 등록 > 마크다운 등록 > 태그 등록 #168

KoEonYack opened this issue Jan 11, 2025 · 0 comments
Assignees
Labels
🐥 FE front-end 개발

Comments

@KoEonYack
Copy link
Member

이력

#166 여기서 태그 자동 등록은 처리하지 못하였음


코드

    // 태그 파싱
    // 정규 표현식을 사용하여 백틱으로 감싸진 문자열을 찾음
    let categories;
    const match = text.match(/- : (.+)/);
    if (match) {
      const rawCategories = match[1];

      // 2. 벡틱(`)으로 감싸진 문자열 추출
      categories = rawCategories.match(/`([^`]*)`/g)?.map((item) =>
        // 3. 괄호 포함된 내용 제거
        item
          .replace(/`/g, '')
          .replace(/\(.*?\)/g, '')
          .trim()
      );
    }
@KoEonYack KoEonYack added the 🐥 FE front-end 개발 label Jan 11, 2025
@KoEonYack KoEonYack self-assigned this Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐥 FE front-end 개발
Projects
None yet
Development

No branches or pull requests

1 participant