Consider a JSONRenderer
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 32/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript
- 領域
- frontend
調査の方向性
まず既存の HTML renderer を読み、出力を要求された JSONRenderer の形状と比較します。リンクされた vdom 仕様と提供された CommonMark の例を確認し、タグ、属性、テキスト、ネストされた子要素をどのように表現すべきかを定義します。同等の入力に対して renderer が要求された構造を生成すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
I'd love to see a "JSONRenderer" which would be equivalent to the HTML renderer's output, except in a form like this:
{
tagName: "h1",
children: "whatever",
attributes: {}
}
Effectively, what I'm hoping for is something that would match (or be similar to) the vdom type currently being implemented in Jupyter frontends.
Example input:
## Try CommonMark
You can try CommonMark here. This dingus is powered by
[commonmark.js](https://github.com/jgm/commonmark.js), the
JavaScript reference implementation.
1. item one
2. item two
- sublist
- sublist
Example output (click to expand me):
{
"attributes": {
"attributes": {},
"children": [
{
"attributes": {},
"children": "Try CommonMark",
"tagName": "h2"
},
{
"attributes": {},
"children": [
"You can try CommonMark here. This dingus is powered by",
{
"attributes": { "href": "https://github.com/jgm/commonmark.js" },
"children": "commonmark.js",
"tagName": "a"
},
", the\nJavaScript reference implementation."
],
"tagName": "p"
},
{
"attributes": {},
"children": [
{ "attributes": {}, "children": "item one", "tagName": "li" },
{ "attributes": {}, "children": "item two", "tagName": "li" },
{
"attributes": {},
"children": [
{
"attributes": {},
"children": "sublist",
"tagName": "li"
},
{ "attributes": {}, "children": "sublist", "tagName": "li" }
],
"tagName": "ul"
}
],
"tagName": "ol"
}
]
},
"children": [
{
"attributes": {},
"children": "Try CommonMark",
"tagName": "h2"
},
{
"attributes": {},
"children": [
"You can try CommonMark here. This dingus is powered by",
{
"attributes": { "href": "https://github.com/jgm/commonmark.js" },
"children": "commonmark.js",
"tagName": "a"
},
", the\nJavaScript reference implementation."
],
"tagName": "p"
},
{
"attributes": {},
"children": [
{ "attributes": {}, "children": "item one", "tagName": "li" },
{ "attributes": {}, "children": "item two", "tagName": "li" },
{
"attributes": {},
"children": [
{ "attributes": {}, "children": "sublist", "tagName": "li" },
{ "attributes": {}, "children": "sublist", "tagName": "li" }
],
"tagName": "ul"
}
],
"tagName": "ol"
}
],
"tagName": "div"
}
- 主要言語
- JavaScript
- スター
- 1.6k
- フォーク
- 234
- 平均マージ
- 1日 27分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
commonmark/commonmark.js のほかの issue
-
White space handling looks inconsistent between HTML block element vs HTML inline element対応中かも @mamicicekel が 20 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
commonmark/commonmark.js#303 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
commonmark/commonmark.js#287 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 20/100
commonmark/commonmark.js#275 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
commonmark/commonmark.js#267 · コメント 3 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
commonmark/commonmark.js#264 · リアクション 1 件 ·
commonmark/commonmark.js の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
521xueweihan/HelloGitHub#4115 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
outline/outline#14348 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
area:install bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信