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

support multi language #79

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

Delta456
Copy link

Implements #70

main.go Show resolved Hide resolved
@Delta456
Copy link
Author

Delta456 commented Apr 15, 2024

This is not complete but I have made a draft for other people to help me figure out implement this.

To run this ./freeze --lannguage py,go main.py

main.py

def main():
   print('Hello world')
   

fmt.Println("Hello world")

EDIT: Read the below comment.

@Delta456
Copy link
Author

I need more test cases. My implementation works.

  • ./freeze --language jinja,html file.jinja

image

  • ./freeze --language html file.jinja

image

  • ./freeze --language jinja file.jinja

image

@Delta456
Copy link
Author

As discussed in alecthomas/chroma#960 (comment), lexers.DelegatingLexer only supports syntaxes which have indeed have something in common. The implementing is working and finalised.

@Delta456 Delta456 marked this pull request as ready for review April 17, 2024 14:10
main.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
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

Successfully merging this pull request may close these issues.

2 participants