tarleb / jira-wiki-markup

Handle Jira wiki markup
MIT License
8 stars 5 forks source link

Image's alt with " broke parsing (Jira Cloud such formating) #9

Closed shapel closed 3 years ago

shapel commented 3 years ago

Hi Bellow, you can find one more item from me, and again thanks for your work!

pandoc -v
pandoc 2.13
Compiled with pandoc-types 1.22, texmath 0.12.2, skylighting 0.10.5,
citeproc 0.3.0.9, ipynb 0.1.0.1
Copyright (C) 2006-2021 John MacFarlane. Web:  https://pandoc.org
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose

input: echo '!Screen Shot 2021-05-17 at 10.47.15.png|width=200,height=183,alt="some text"!' | pandoc -f jira -t json | jq

output:


{
  "pandoc-api-version": [
    1,
    22
  ],
  "meta": {},
  "blocks": [
    {
      "t": "Para",
      "c": [
        {
          "t": "Str",
          "c": "!Screen"
        },
        {
          "t": "Space"
        },
        {
          "t": "Str",
          "c": "Shot"
        },
        {
          "t": "Space"
        },
        {
          "t": "Str",
          "c": "2021-05-17"
        },
        {
          "t": "Space"
        },
        {
          "t": "Str",
          "c": "at"
        },
        {
          "t": "Space"
        },
        {
          "t": "Str",
          "c": "10.47.15.png|width=200,height=183,alt=\"some"
        },
        {
          "t": "Space"
        },
        {
          "t": "Str",
          "c": "text\"!"
        }
      ]
    }
  ]
}```

expect:
Alt with " symbol should not break image parsing
tarleb commented 3 years ago

Thanks for the report, as usual :)