Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

discrepancy in --doc output between standard/RAKUAST #5536

Open
coke opened this issue Mar 5, 2024 · 2 comments
Open

discrepancy in --doc output between standard/RAKUAST #5536

coke opened this issue Mar 5, 2024 · 2 comments
Assignees
Labels
Fixed in RakuAST This issue has been fixed in RakuAST

Comments

@coke
Copy link
Collaborator

coke commented Mar 5, 2024

Found in the raku/doc repository, this test fails, meaning there is a difference in the output between RAKUAST and non --doc processing:

RAKUDO_AST_DOCS=v xt/rakuast-compare.rakutest doc/Language/regexes.rakudoc
1..1
not ok 1 - doc/Language/regexes.rakudoc contents match
# Failed test 'doc/Language/regexes.rakudoc contents match'
# at xt/rakuast-compare.rakutest line 43
--- /var/folders/8n/rypl9_990b9578zd5435pgr40000gn/T/nXmOYXiJga	2024-03-05 08:04:07
+++ /var/folders/8n/rypl9_990b9578zd5435pgr40000gn/T/O_hjAgK0hl	2024-03-05 08:04:07
@@ -2796,7 +2796,7 @@
     Disable backtracking: :

 The : metacharacter disables backtracking for the previous atom. Thus, /
-.*: a/ does not match " a" because the .* matches the entire string,
+.*: a/ does not match "  a" because the .* matches the entire string,
 leaving nothing for the a to match without backtracking.

     Enable greedy backtracking: :!
# You failed 1 test of 1

The original rakudoc source is:

The C<:> metacharacter disables backtracking for the previous atom.  Thus,
C</ .*: a/> does not match C<"  a"> because the C<.*> matches the entire string,
leaving nothing for the C<a> to match without backtracking.

Note that on the second line, the C<" a"> has two spaces before the a; the old version renders a single space, the new version renders both.

@coke coke added docs Anything documentation-related and removed docs Anything documentation-related labels Mar 5, 2024
@lizmat
Copy link
Contributor

lizmat commented Mar 5, 2024

Feels to me the old renderer is wrong?

@coke
Copy link
Collaborator Author

coke commented Mar 5, 2024

Seems so - if this is "fixed when RakuAST lands", I'm OK with that.

@ab5tract ab5tract added the Fixed in RakuAST This issue has been fixed in RakuAST label Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in RakuAST This issue has been fixed in RakuAST
Projects
None yet
Development

No branches or pull requests

3 participants