-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't remove other comments on line with code annotation in LaTeX
Adapt regex for code annotation replacement in LaTeX to keep other comments on the same line.
- Loading branch information
Showing
4 changed files
with
49 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
format: latex | ||
_quarto: | ||
tests: | ||
pdf: null | ||
latex: | ||
ensureFileRegexMatches: | ||
- | ||
- '\\#mutate\(speed \= speed \* 2\)' | ||
- '\\CommentTok\{\\# with a comment \}' | ||
- '\\CommentTok\{// return \}' | ||
- '\\CommentTok\{// let greeting \= name \+ hello; \}' | ||
- '\\circled\{1\}' | ||
- '\\circled\{2\}' | ||
- '\\circled\{3\}' | ||
- [] | ||
--- | ||
|
||
```r | ||
library(dplyr) | ||
cars %>% # <1> | ||
#mutate(speed = speed * 2) %>% # <2> | ||
mutate(speed = speed * 4) # with a comment # <3> | ||
``` | ||
|
||
1. test1 | ||
2. test2 | ||
3. test3 | ||
|
||
```js | ||
let name = "Bingo"; // <1> | ||
name; | ||
let hello = " dit bonjour !"; | ||
hello; // return // <2> | ||
// let greeting = name + hello; // <3> | ||
``` | ||
|
||
1. test1 | ||
2. test2 | ||
3. test3 |