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

旧漢字・異体字リストをオブジェクトで管理する #236

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yuuta040208
Copy link

概要

#199 のIssueの一部に対応してみました🙋

旧漢字・異体字リストのリファクタリング。今は split した後の配列のインデックスをキーに新旧を突き合わせているが、オブジェクトなどを使うことで管理を容易にし、簡単に追加できるようにしたい。

方針

  • 配列に追加するだけで辞書を拡張可能にする

    export const dictionary = [
      jisDai2Dictionary,
      // Add more dictionary here
      // exmapleDictionary,
    ].flat()
    
  • 辞書は JSON.stringify() 可能な形式にすることで、外部からJSONファイル等をインポートするときに容易に対応可能にする

    [
      ...,
      { src: '籠', dst: '篭' },
      { src: '彌', dst: '弥' },
      { src: '麩', dst: '麸' },
    ]
    

@yuuta040208
Copy link
Author

@kamataryo

お忙しいところ恐縮ですが、こちらレビューお願いいたします...🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant