File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed
Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 2020 with :
2121 persist-credentials : false
2222 - name : Set up Ruby
23- uses : actions /setup-ruby@v1
23+ uses : ruby /setup-ruby@v1
2424 with :
25- ruby-version : ' 2.7 '
25+ ruby-version : ' 3.4 '
2626 - name : Setup python
2727 uses : actions/setup-python@v1
2828 with :
Original file line number Diff line number Diff line change 1+ import re
2+
3+ BYEXMAPLE_PROMT_RE = re .compile (r"^(>>|\.\.|=>)( |$)" , re .M )
4+
5+ def byexample_repl (matchobj ):
6+ if matchobj .group (1 ) == '=>' : return '#=> '
7+ else : return ''
8+
9+ def define_env (env ):
10+ """
11+ This is the hook for defining variables, macros and filters
12+
13+ - variables: the dictionary that contains the environment variables
14+ - macro: a decorator function, to declare a macro.
15+ """
16+
17+ @env .filter
18+ def remove_code_promt (text ):
19+ return BYEXMAPLE_PROMT_RE .sub (byexample_repl , text )
You can’t perform that action at this time.
0 commit comments