diff --git a/patacrep/songs/chordpro/ast.py b/patacrep/songs/chordpro/ast.py index b2cc6c08..0227d457 100644 --- a/patacrep/songs/chordpro/ast.py +++ b/patacrep/songs/chordpro/ast.py @@ -153,6 +153,11 @@ class Chord(AST): # pylint: disable=too-many-arguments self.chord = chord + @property + def pretty_chord(self): + """Return the chord with nicer (utf8) alteration""" + return self.chord.replace('b', '♭').replace('#', '♯') + class Verse(AST): """A verse (or bridge, or chorus)""" _template = "verse" diff --git a/patacrep/songs/chordpro/data/html/content_chord b/patacrep/songs/chordpro/data/html/content_chord index 7d5ec6ca..baa97f7e 100644 --- a/patacrep/songs/chordpro/data/html/content_chord +++ b/patacrep/songs/chordpro/data/html/content_chord @@ -1 +1 @@ -((- content.chord -)) +((- content.pretty_chord -))