Test /
PmSyntax-ChordPro
SDVA($CustomSyntax, array(
'CHORDPRO,00' => '<ws0 =directive>comment>*meta_nobg>=meta_nobg>punct
/(\|\|:)([\s\S]*?)(:\|\|)/g
/^ *#.*$/gm
/\{[a-z_]+:?\}/gi
/(\{[a-z_]+:)(.+?)(\})/gi
/\[[A-G][b#]?m?[769]?\]/g
'));
I'm not sure if the "#comment" can only appear alone on a line (currently defined), or after other text on the same line.
This is fantastic thanks, I hadn't progressed in my understanding enough to appreciate the power of this. # comment apply to an entire line
The above is enabled on this page, test samples below. Note: only the $CustomSyntax
configuration is enabled here, not the full ChordPro recipe, hence (:markup class=norender:)
.
!!Long markup ||: :|| !!Long markup ||: Chords [Bb]and [C#]Lyrics [A]An example [D]of [G7]lyrics and tablature An example with no chords [G][F][E][Chords][Only] And another example with no chords, followed by an empty line # comment line [B]text of chorus more chorus text[Cm7] D D D D D -------------2-----2----------------2-----2----------------2- -------------3-----3----------------3-----3----------------3- ----------o--2-----2-------------o--2-----2-------------o--2- ----2--4--------o----------2--4--------o----------2--4------- -o----------------------o----------------------o------------- ------------------------------------------------------------- :|| !!short markup ||: :|| !!short markup ||: [A]An example [D]of [G]lyrics and tablature # comment line [B]chorus Csus4 (x33011) Fmaj7 (132211) :|| !!test cases ||: Blank line follows[G] Blank line precedes[A] and follows Two directives on one line comments # indented comment embedded directive ['|] :|| !!pathological markup ||::|| ---- ||: :|| ---- ||: :|| ---- ||:test:|| ---- ||:test :|| ---- :||: :test:|| !!Test if ChordPro CustomSyntax impacts normal PmWiki markup # not a comment {comment: not a comment} {ChordPro: not a chordpro directive} Just normal [B]rackets |