bpm.diffViewer
Visualisation de diff texte/code (split ou unified).
Python
bpm.diffViewer(original=old_text, modified=new_text)| Prop | Type | Défaut | Requis | Description |
|---|---|---|---|---|
original | string | — | Oui | Texte ou code original. |
modified | string | — | Oui | Texte ou code modifié. |
language | string | — | Non | Langage pour la coloration (optionnel). |
mode | "split" | "unified" | split | Non | Affichage côte à côte ou unifié. |
title | { original?: string; modified?: string } | — | Non | Titres des colonnes (mode split). |
className | string | — | Non | Classes CSS. |
Exemples
bpm.diffViewer(original=old_code, modified=new_code)bpm.diffViewer(original=old_code, modified=new_code, mode="unified")bpm.diffViewer(original=a, modified=b, title={"original": "v1", "modified": "v2"})