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

[Feat] Allow extracting code blocks with lexers #1

Open
PrashanthaTP opened this issue Nov 14, 2022 · 1 comment
Open

[Feat] Allow extracting code blocks with lexers #1

PrashanthaTP opened this issue Nov 14, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@PrashanthaTP
Copy link
Owner

PrashanthaTP commented Nov 14, 2022

Is your proposal related to a problem?

Currently as of e970a9b / dev-0.1.0,
there is no option to extract code block if lexers are used
to specify which programming language is present in the code block

Describe the solution you'd like

(Describe your proposed solution here.)

Describe alternatives you've considered

Keeping the required blocks from the output afte dumping into a file

Additional context

It is better if we can extract the code blocks with specified programming language
which could be passed as a command line argument

Lets say
this is the content of README.md

An example with python and c code

some python code here
```python3
print("Hello World!!!")
```

and some c code
```c
#include <stdio.h>
int main(){

   return 0;
}
```

IT would be useful if we get an option to extract the code block with c or python only
in addition to the option of extracting all blocks irrespective of language

@PrashanthaTP
Copy link
Owner Author

olle idea 👏

@PrashanthaTP PrashanthaTP added the enhancement New feature or request label Nov 14, 2022
PrashanthaTP added a commit that referenced this issue Mar 19, 2023
+ Determines which code blocks will be extracted
+ If this option is not provided only ``` blocks will be extracted
+ Thoughts
  - option to scan all code blocks irrespective language?
    May not be necessary as if the code blocks are of different language
    then most probably there is no use case to have them same dest file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant