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

bug-fix: Improve syntax highlighting for template strings #1130

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

hellovai
Copy link
Contributor

@hellovai hellovai commented Nov 1, 2024

Important

Improves syntax highlighting for template strings in BAML by simplifying regex and adding a new block string pattern.

  • Syntax Highlighting:
    • Simplified begin regex in template_string_declaration to (template_string)\s+(\w+).
    • Adjusted beginCaptures in template_string_declaration to remove unnecessary captures.
    • Updated patterns in template_string_declaration to include #comment, #function_parameters, and #block_string.
    • Added new block_string pattern to handle block strings with #" and "# delimiters.

This description was created by Ellipsis for 95e6fad. It will automatically update as commits are pushed.

Copy link

vercel bot commented Nov 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
baml ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 1, 2024 4:10pm

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to 95e6fad in 3 minutes and 20 seconds

More details
  • Looked at 53 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. typescript/vscode-ext/packages/syntaxes/baml.tmLanguage.json:86
  • Draft comment:
    The 'end' pattern for 'template_string_declaration' still includes a double quote and hash, which might not match the intended syntax after the 'begin' pattern was simplified. Consider reviewing the 'end' pattern for consistency.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_uUWEOUzTR35YEvmx


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@hellovai hellovai added this pull request to the merge queue Nov 4, 2024
Merged via the queue into canary with commit 54de4b6 Nov 4, 2024
10 checks passed
@hellovai hellovai deleted the syntax-highlighting-fixes branch November 4, 2024 06:44
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.

1 participant