Open marklawlor opened 9 years ago
Good call. I'll look into it (unless you beat me to it.)
It will introduce some inconsistency between formats that support it and those which don't, but I can live with that.
Format | Supports newlines |
---|---|
HTML | :thumbsup: |
MediaWiki | :thumbsup: |
JSON | :thumbsup: |
Github markdown | :thumbsdown: |
Atlassian JIRA | :thumbsdown: |
Oops. Didn't mean to close this one.
I didn't realise there would be an inconsistency between the formats. Instead of reformatting your data, I think a warning should popup and provide you the option to reformat your input. Something along the lines of:
"Warning: Github markdown does not support multiline strings, click here to convert these cells to single lines"
Hello friends. I'd also like this feature.
What a great feature request! I'm not committing to do anything, but I was curious how this works.
"
). "false"
, which must retain the quotation marks.)""
)With that in mind, here are a couple of variants of these cases: https://docs.google.com/spreadsheets/d/14ryiyI9Os4MW-mPN4qsCyXvM8YS4W2Klh0A3XsfEP3s/edit#gid=0
And the copied output:
Heading 1 Heading 2
I am a single line string -
"I am a
multiline string" -
"i am a string with quotation marks" -
"I am a string that starts with quotation marks but doesn't end with them -
"""I am a multiline string that starts with quo-
tation marks but doesn't end with them" -
"I am a
multiline string in the first column" "I am a
multiline string in the second column"
Edit: turns out Github converts pasted spreadsheet cells into markdown table syntax now too
If the source spreadsheet contains a cell with a multiline string (includes a carriage return, not word wrapping), the generated Markdown will be incorrect. Carriage returns don't make sense in markdown and should be stripped from the input. Cells with multiple line strings are surrounded by double quotes when copied from excel & google docs.
Example Spreadsheet
https://docs.google.com/spreadsheets/d/1PtbPUHGrRY1P8Blv1E9CMuObq5lpyN2bGJoq0SjhKGw/edit?usp=sharing
Resulting markup
"I am a
multiline string" | I am a single line string
Expected