Skip to content

Opening new file converts apostrophe to hex code #64

@junder873

Description

@junder873

When I import a new citation, I have a template to import various elements, specifically:

---
title: {{title}}
alias:
- 
authors: {{authorString}}
year: {{year}}
---

# Abstract

{{abstract}}

If any of those elements contain an apostrophe ('), then it is converted to the hex code ('). When displayed in the preview, these are correct, but it makes reading the markdown more difficult.

For example, the BibTex:

@ARTICLE{Obrien1988-im,
  title     = "Analysts' forecasts as earnings expectations",
  author    = "O'brien, Patricia C",
  abstract  = "I examine three composite analyst forecast of earnings per share
               as proxies for expected earnings. The most current forecast
               weakly dominates the mean and median forecasts in accuracy. This
               is evidence that forecast dates are more relevant for
               determining accuracy than individual error. Consistent with
               previous research, I find analysts more accurate than
               time-series models. However prior knowledge of forecast errors
               from a quarterly autoregressive model predicts excess stock
               returns better than prior knowledge of analysts' errors. This is
               inconsistent with previous research, and is anomalous given
               analysts' greater accuracy.",
  journal   = "Journal of Accounting and Economics",
  publisher = "Elsevier",
  volume    =  10,
  number    =  1,
  pages     = "53--83",
  month     =  jan,
  year      =  1988,
  url       = "https://www.sciencedirect.com/science/article/pii/0165410188900237",
  file      = "All Papers/O/O'brien 1988 - Analysts' forecasts as earnings expectations.pdf",
  issn      = "0165-4101",
  doi       = "10.1016/0165-4101(88)90023-7"
}

creates the following Markdown:

---
title: Analysts' forecasts as earnings expectations
alias:
- 
authors: Patricia C O'brien
year: 1988
---

# Abstract

I examine three composite analyst forecast of earnings per share as proxies for expected earnings. The most current forecast weakly dominates the mean and median forecasts in accuracy. This is evidence that forecast dates are more relevant for determining accuracy than individual error. Consistent with previous research, I find analysts more accurate than time-series models. However prior knowledge of forecast errors from a quarterly autoregressive model predicts excess stock returns better than prior knowledge of analysts' errors. This is inconsistent with previous research, and is anomalous given analysts' greater accuracy.

I think this is due to how JavaScript handles apostrophes but would appreciate any fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions