### Bug description

Hi there, first time submitting an  issue, so I hope I get all the information you need. 

I was trying to put some information followed by a citation in parenthesis. For example: (this is a piece of information; Bananas, 2022).  So I tried to use the citation syntax: `[this is a piece of information; @Bananas2022]`. However, this preserves the square brackets and render the citation as if it were an inline citation as: [this is a piece of information; Bananas (2022)]

I tested in four examples that you can see in the code and pictures below. A reproducible (I hope) example files are at the end. This might be a Pandoc Issue rather than quarto, but I am not sure.

Using a `,` seems to work fine, but it mess the chronological order if multiple citations are included

Thanks!

```
---
title: "Notes and citations and square brackets"
# format: html
format: docx
# format: pdf
bibliography: references.bib
---

1.  Unexpected output citation square brackets preserved, citation
    format as in-line [e.g., bananas; @quarto]

2.  Expected output in PDF, but missing `;` in word and html [e.g.,
    bananas`;`{=latex} @quarto]

3.  Same as example 2, but `;` also missing in pdf[e.g.,
    bananas`;`{=openxlm
} @quarto]

4.  Trying to trick .docx output, did not work. got double `;` in .pdf
    [e.g., bananas ;`;`{=latex} @quarto]
``` 

# HTML output:

![msedge_XNl5p3QaO9](https://user-images.githubusercontent.com/41179053/193479543-9828f656-3833-4e34-b9cb-819bce00a949.png)

# Pdf output
![msedge_qrh21oOI3N](https://user-images.githubusercontent.com/41179053/193479601-dfe3ea03-ffd3-4d63-bf5a-0e2363c88581.png)

# docx output

![image](https://user-images.githubusercontent.com/41179053/193479632-0ec76c68-6b1c-462a-91ce-8c2a4c01ece6.png)

# Reproducible code (I hope)

I had to include two files, the .qmd and the .bib file

 [Test.zip](https://github.com/quarto-dev/quarto-cli/files/9693720/Test.zip)

# Details

R version: 4.2.1
R studio version:  2022.07.0 Build 548
Quarto version: 1.1.251
windows version: 10.0 build 19044


### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [X] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
dragonstyle
2022-10-02T23:02:20Z
cicarrascog
bug
v1.3
closed
Wrong citation format when text and citations are included inside square brackets
https://github.com/quarto-dev/quarto-cli/issues/2705