From 79db0b33cf861d26b805b7f1fc0853e002cac0b0 Mon Sep 17 00:00:00 2001 From: Oldes Huhuman Date: Fri, 24 Feb 2023 14:34:36 +0100 Subject: Don't require script headers in Rebol and Red codes. (#2349) * Don't require script headers in Rebol and Red codes. Resolves: https://github.com/pygments/pygments/issues/2348 * Not modifying the copyright * Updated tests for Rebol and Red * Rebol: removed the unneeded code instead of commenting. --- tests/examplefiles/rebol/test.r3 | 6 ------ tests/examplefiles/rebol/test.r3.output | 19 ------------------- tests/examplefiles/red/example.red.output | 4 +++- tests/examplefiles/red/example.reds.output | 5 ++++- 4 files changed, 7 insertions(+), 27 deletions(-) (limited to 'tests') diff --git a/tests/examplefiles/rebol/test.r3 b/tests/examplefiles/rebol/test.r3 index 707102db..f50a0389 100644 --- a/tests/examplefiles/rebol/test.r3 +++ b/tests/examplefiles/rebol/test.r3 @@ -1,9 +1,3 @@ -preface.... everything what is before header is not evaluated -so this should not be colorized: -1 + 2 - -REBOL [] ;<- this is minimal header, everything behind it must be colorized - ;## String tests ## print "Hello ^"World" ;<- with escaped char multiline-string: { diff --git a/tests/examplefiles/rebol/test.r3.output b/tests/examplefiles/rebol/test.r3.output index c5e0c26a..2a57764c 100644 --- a/tests/examplefiles/rebol/test.r3.output +++ b/tests/examplefiles/rebol/test.r3.output @@ -1,22 +1,3 @@ -'p' Comment -'r' Comment -'eface.... eve' Comment -'r' Comment -'ything what is befo' Comment -'r' Comment -'e heade' Comment -'r' Comment -' is not evaluated\nso this should not be colo' Comment -'r' Comment -'ized:\n1 + 2\n\n' Comment - -'REBOL [' Generic.Strong -']' Generic.Strong -' ' Text -';<- this is minimal header, everything behind it must be colorized\n' Comment - -'\n' Text - ';## String tests ##\n' Comment.Special 'print' Name.Builtin diff --git a/tests/examplefiles/red/example.red.output b/tests/examplefiles/red/example.red.output index 54d6ffc9..7e79b4cf 100644 --- a/tests/examplefiles/red/example.red.output +++ b/tests/examplefiles/red/example.red.output @@ -1,4 +1,6 @@ -'Red [' Generic.Strong +'Red' Name.Variable +' ' Text +'[' Generic.Strong '\n ' Text 'Title:' Generic.Subheading ' ' Text diff --git a/tests/examplefiles/red/example.reds.output b/tests/examplefiles/red/example.reds.output index 70f5da8d..75d891fe 100644 --- a/tests/examplefiles/red/example.reds.output +++ b/tests/examplefiles/red/example.reds.output @@ -1,4 +1,7 @@ -'Red/System [' Generic.Strong +'Red' Name.Variable +'/System' Name.Attribute +' ' Text +'[' Generic.Strong '\n ' Text 'Title:' Generic.Subheading ' ' Text -- cgit v1.2.1