rescript-lang / rescript-lang/rescript-react
Transform HTML entities to unicode
まだ誰も着手していません。
- 主要言語
- ReScript
- スター
- 517
- フォーク
- 45
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
The Babel JSX compiler converts HTML entities into the unicode characters they represent. In ReScript, we have to use the actual unicode directly. For some characters, like this isn't always convenient.
Would it be possible for the React PPX to do the same transformation that Babel does? See their entity map for reference: https://github.com/babel/babel/blob/b3e2bcda73dea7d68b4c82bfabb92acb11b1ed90/packages/babel-parser/src/plugins/jsx/xhtml.js
Babel example
Input
let f = () => <div> </div>;
output
let f = () => /*#__PURE__*/React.createElement("div", null, "\xA0");
ReScript example
Input
let f = () => <div> {React.string(" ")} </div>
Output
function f(param) {
return React.createElement("div", undefined, " ");
}
Note that " will render as-is, not as an actual nonbreaking space character.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
React PPX JSX変換から始め、BabelのリンクされたJSXエンティティマップと動作を比較します。Issue内のBabelとReScriptの例を確認するケースとして使い、Babelと同様に、サポートされているHTMLエンティティが対応するUnicode文字を生成すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- babel, react
- 領域
- frontend, tooling
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100