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

Failure to parse text properly: "Group definition failed" #42

Closed
petermott opened this issue Nov 21, 2024 · 1 comment
Closed

Failure to parse text properly: "Group definition failed" #42

petermott opened this issue Nov 21, 2024 · 1 comment

Comments

@petermott
Copy link

When presented with the below text marquee wrongly identiifes "h2" and reports errors.

txt = "Call:
lm(formula = mpg ~ cyl, data = mtcars)

Residuals:
    Min      1Q  Median      3Q     Max 
-4.9814 -2.1185  0.2217  1.0717  7.5186 

Coefficients:
            Estimate Std. Error t value       Pr(>|t|)    
(Intercept)  37.8846     2.0738   18.27        < 2e-16 ***
cyl          -2.8758     0.3224   -8.92 0.000000000611 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 3.206 on 30 degrees of freedom
Multiple R-squared:  0.7262,	Adjusted R-squared:  0.7171 
F-statistic: 79.56 on 1 and 30 DF,  p-value: 0.0000000006113"

grob = marquee_grob( txt)
showGrob(grob)

Screenshot 2024-11-21 error grob

PS Windows with Cairo graphics

@petermott
Copy link
Author

My bad. The problem is with support for markdown. Remove "---" and it works fine apart for interpreting some of the * as bold or italic instructions. But the best way to get round this is to declare the whole thing a "fenced code block" which means putting it in triple ` backquotes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant