Add a mode which preserves carriage returns
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
Inizia tracciando come vengono caricati, analizzati e scritti i file .ss e il formato .ss.asar, inclusa la normalizzazione dei ritorni a capo descritta qui. Definisci il comportamento della modalità riguardo alla conservazione di \r e al round-trip dei file senza modificare altre regole di escaping; il lavoro è completo quando gli snapshot .ss.asar conservano i ritorni a capo, mentre gli snapshot ordinari mantengono il comportamento attuale.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Here are two important properties of the .ss snapshot files:
- exactly character-for-character accurate, no slop around leading or trailing whitespace, no forbidden characters
- what you see in the snapshot file is exactly what you get, except for the following escaping rules which preserve the above
- the following characters are escaped:
𐝃->𐝃𐝃,𐝁->𐝃𐝁(they are from an untranslated dead language) - if the first character on a line within a snapshot is
╔then it is replaced with𐝁(this preserves ASCII art within snapshots)
- the following characters are escaped:
This combination of character-accurate + WYSIWYG breaks down in only one place - line endings. You can't see them, and git's complex and poorly understood line-ending-mutation rules mean that most teams can't reliably do source control that differentiates between \n and \r\n.
Rather than randomly punch users in the face with this triviality, we do the following:
- Internally, every text-based snapshot in spotless-snapshot has a
.replace("\r", ""), so snapshots will never fail because of line-ending differences - New
.ssfiles are always written using\nline endings - If an
.ssfile is loaded from disk with\r\n, it is converted and parsed using\n, but will be written back to disk as\r\n
However, this means that the snapshots are not exactly character-for-character accurate because they do not preserve \r. For users that want to preserve \r, we could add a mode which preserves the \r character if the user uses the .ss.asar format
- #1
Adding support for storing \r within .ss files might be possible (maybe encode them as 𐝃r?), but doesn't seem like a good idea.
- Lingua principale
- Kotlin
- Stelle
- 101
- Fork
- 18
- Merge medio
- 6g 11h
- PR unite (30g)
- 5
Guida per i contributori
Apri 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 diffplug/selfie
-
Selfie JVM Snapshot Garbage Collection is overly zealous when using multiple test suites in gradle Apertabug jvm
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
enhancement jvm
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
bug jvm
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
bug docs jvm
Difficoltà 2/5 1-3 ore Idoneità per principianti 50/100
-
bug jvm py
Difficoltà 2/5 1-3 ore Idoneità per principianti 48/100
Tutte le issue di diffplug/selfie
Issue simili
-
Remove custom segment colors Apertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
libre-tube/LibreTube#8803 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Telegram !!! Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Xposed-Modules-Repo/com.fuck.iab#24 · 3 commenti · 1 reazione ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
SimonHalvdansson/Harmonic-HN#361 ·