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

fix: PHP syntax highlighting in completions #32

Merged
merged 2 commits into from
Jul 27, 2022
Merged

Conversation

jfcherng
Copy link
Collaborator

image

Fixes #30

Signed-off-by: Jack Cherng <jfcherng@gmail.com>
@jfcherng jfcherng added the bug Something isn't working label Jul 27, 2022
@TerminalFi
Copy link
Owner

Can we strip <?php after we generate the HTML content?

@jfcherng
Copy link
Collaborator Author

jfcherng commented Jul 27, 2022

Can we strip <?php after we generate the HTML content?

it's only for display. not sure what you mean.

We use many backticks to denote a fenced code block because if we are writing in Markdown,
Copilot may suggest 3 backticks for a fenced code block and that can break our templating.

```py
COMPLETION_TEMPLATE = reformat(
    """
    <div class="header">{header_items}</div>
    ``````{lang}
    {code}
    ``````
    """
)
```

Signed-off-by: Jack Cherng <jfcherng@gmail.com>
@TerminalFi
Copy link
Owner

Fixes #33

@jfcherng
Copy link
Collaborator Author

jfcherng commented Jul 27, 2022

Fixes #33

Nope. #33 is another circumstance. But I am currently doing some experiments for it.

@jfcherng jfcherng merged commit 741c285 into master Jul 27, 2022
@jfcherng jfcherng deleted the fix/php-highlighting branch July 27, 2022 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PHP completions need leading <?php to be highlighted properly
3 participants