Skip to content

Won't work with attr.source='.numberLines' in r chunk? #41

Open
@tanduc307

Description

@tanduc307

Dear developers of flair package,
This is a great tool for highlighting source code R that useful for training new R users. This is what I am looking for!! Thanks for creating it! Anyway, here is my issue:

First, I highlight code

{r, echo=TRUE}

decorate("code_1") %>%
  flair_lines(2)

it works OK in this example

{r code_1, echo=TRUE, warning=FALSE, message=FALSE, include=FALSE}

iris %>%
  group_by(Species) %>%
  summarize(mean(Sepal.Length))

but it not works if I add attr.source='.numberLines' in r chunk option of code_1
This is the error message:

Error in eval(x, envir = envir) : object '.numberLines' not found
Calls: <Anonymous> ... eval_lang -> in_input_dir -> in_dir -> eval -> eval
Execution halted

I hope my issue was clearly presented. Hoping this can be solved.
Regards,
Duc

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions