Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Support text highlights with <mark>

Aperta
#210 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go, markdown
Ambito
cli

Direzione di ricerca

Start by tracing the read, publish, update, and check entry points that handle Markdown and Confluence formatting. Compare the existing span and mark handling, then verify that highlighted text survives a read → edit → update cycle and that the supported mark syntax is reported consistently by check.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Problem

  • read drops highlights. Confluence's editor can give a run of text a background colour. It is stored as <span style="background-color: rgb(…)"> and becomes an ADF backgroundColor mark. read writes only the text, so a read → edit → update cycle removes every highlight from the page. (Verified 2026-09-26 on a scratch page.)
  • There is no way to write a highlight in Markdown. ==text== is not GFM and stays literal. A raw <mark> passes through, but Confluence drops the tag and keeps only the text. Only a raw <span style="background-color: …"> works, and nobody would guess that.

What Confluence did with each spelling (storage read back, then ADF):

written stored takes effect (ADF)
<span style="background-color: #fff0b3;"> kept, rewritten as rgb(255,240,179) yes, backgroundColor
the same in rgb() kept yes
<mark> tag dropped, text kept no
<span data-highlight-colour="…"> (the table-cell attribute) attribute dropped no
<span style="color: …"> (text colour, for comparison) kept yes, textColor

Proposal

Use <mark>, which GitHub renders:

Markdown published as
<mark>some text</mark> <span style="background-color: #fff0b3;">some text</span> (a default colour)
<mark style="background-color: #ffbbbb;">some text</mark> <span style="background-color: #ffbbbb;">some text</span>

read writes a highlighted span back as <mark> (the default colour) or <mark style="background-color: …"> (any other colour), so the page survives a round trip. Markdown inside a <mark> is still converted.

The attribute is background-color, not color, because in CSS color is the text colour.

Open questions

  1. Default colour. #fff0b3 is the table-cell palette's yellow. The editor's text-highlight palette may differ; read back a highlight made in the editor to find out.
  2. Names or only hex? Cell colours accept swatch names. A name is not valid in a CSS background-color, so either hex only, or names in another attribute.
  3. An unrecognised colour. Publish with a warning, as an unknown cell colour does, and have check report it?
  4. Text colour. read probably drops <span style="color: …"> the same way. Handle it here, or in a separate issue?
Lingua principale
Go
Stelle
2
Fork
0
Merge medio
2h 31m
PR unite (30g)
59

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di mozilla/markfluence

Tutte le issue di mozilla/markfluence

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.