@@ -22,28 +22,44 @@ describe("transforming sequences should", () => {
2222 assert . equal (
2323 parse ( { } , "some text **strongly** *emphasized* `code`" ) ,
2424 "<p>some text <strong>strongly</strong> <em>emphasized</em> <code>code</code></p>" ,
25- "" ,
25+ ) ;
26+ assert . equal (
27+ parse ( { } , "Here is some //non// *variable* text." ) ,
28+ "<p>Here is some //non// <em>variable</em> text.</p>" ,
2629 ) ;
2730 } ) ;
2831
2932 describe ( "work for" , ( ) => {
30- const CASES : readonly [ string | undefined , string , string ] [ ] = [
31- [ undefined , "||something||" , "<p><kbd>something</kbd></p>" ] ,
33+ const CASES : readonly [
34+ string | undefined ,
35+ string ,
36+ string ,
37+ string | undefined ,
38+ ] [ ] = [
39+ [ undefined , "||something||" , "<p><kbd>something</kbd></p>" , undefined ] ,
3240 [
3341 "^" ,
3442 "Press ^^x^^.\n\nThen something." ,
3543 "<p>Press <kbd>x</kbd>.</p>\n<p>Then something.</p>" ,
44+ undefined ,
3645 ] ,
3746 [
3847 "=" ,
3948 "1. Press === ==Ctrl== + ==Alt== + ==x== ===.\n2. Click on **Cancel**." ,
4049 "<ol>\n<li>Press <kbd><kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>x</kbd></kbd>.</li>\n<li>Click on <strong>Cancel</strong>.</li>\n</ol>" ,
50+ undefined ,
51+ ] ,
52+ [
53+ "^" ,
54+ "Press ^^^ ^^Ctrl^^ + ^^ !! x !! ^^ ^^^.\n\nThen something." ,
55+ "<p>Press <kbd><kbd>Ctrl</kbd> + <kbd><var>x</var></kbd></kbd>.</p>\n<p>Then something.</p>" ,
56+ "!" ,
4157 ] ,
4258 ] ;
4359
44- for ( const [ delimiter , input , output ] of CASES ) {
60+ for ( const [ delimiter , input , output , variableDelimiter ] of CASES ) {
4561 it ( `delimiter ${ delimiter } and input ${ JSON . stringify ( input ) } ` , ( ) => {
46- assert . equal ( parse ( { delimiter } , input ) , output ) ;
62+ assert . equal ( parse ( { delimiter, variableDelimiter } , input ) , output ) ;
4763 } ) ;
4864 }
4965 } ) ;
0 commit comments