Consider a JSONRenderer
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 32/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript
- Ambito
- frontend
Direzione di ricerca
Inizia leggendo l’HTML renderer esistente e confrontando il suo output con la struttura JSONRenderer richiesta. Esamina la specifica vdom collegata e l’esempio CommonMark fornito per definire come devono essere rappresentati tag, attributi, testo ed elementi figli annidati. Il lavoro è completato quando il renderer produce la struttura richiesta per un input equivalente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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"
}
- Lingua principale
- JavaScript
- Stelle
- 1.6k
- Fork
- 234
- Merge medio
- 1g 27m
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di commonmark/commonmark.js
-
White space handling looks inconsistent between HTML block element vs HTML inline elementForse già presa @mamicicekel l’ha presa 19 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
commonmark/commonmark.js#303 · 2 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
commonmark/commonmark.js#287 · 1 reazione ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 20/100
commonmark/commonmark.js#275 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
commonmark/commonmark.js#267 · 3 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
commonmark/commonmark.js#264 · 1 reazione ·
Tutte le issue di commonmark/commonmark.js
Issue simili
-
bug confirmed issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
open-webui/open-webui#33196 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
area: apple-music area: build-release bug effort: small priority: high
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
ChristianTabor/Argon#32 ·
I maintainer di solito rispondono entro 1 giorno
-
0️⃣ phase/new
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100