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

Code strings: ~'hello world'~ rendered literally #77

Open
ddoherty03 opened this issue Nov 27, 2017 · 4 comments
Open

Code strings: ~'hello world'~ rendered literally #77

ddoherty03 opened this issue Nov 27, 2017 · 4 comments

Comments

@ddoherty03
Copy link

I would expect that ~'hello world'~ would render as 'hello world' but instead it gets rendered literally.

Without the single quotes rendering works correctly, but the single quotes seem to cause confusion.

I want to be able to describe a ruby string by putting it in code font, including the quotes, but this bug makes it impossible.

@oystersauce8
Copy link

I have the same issue. I feel it's because these guys are adhering strictly to an org standard.
I'm thinking of using a fork of this repo - patched, so my jeyll blog can render all kinds of inline snippets with quotes in them

@oskarkv
Copy link

oskarkv commented May 7, 2021

@oystersauce8 Do you know where I can find more information about this behaviour/standard?

@ddoherty03
Copy link
Author

I opened this issue, mainly so I could write Github README's with org-mode. Here is a transcript using the seeing-is-believing gem to demonstrate the issue:

require 'org-ruby'  # => true

# No delimiters
Orgmode::Parser.new("~hello, world~").to_textile  # => "p. @hello, world@\n"
# With single quotes, problems
Orgmode::Parser.new("~'hello, world'~").to_textile  # => "p. ~'hello, world'~\n"
# With double quotes, problems too
Orgmode::Parser.new("~\"hello, world\"~").to_textile  # => "p. ~\"hello, world\"~\n"
# But not with backquotes
Orgmode::Parser.new("~`hello, world`~").to_textile  # => "p. @`hello, world`@\n"
# Or parens
Orgmode::Parser.new("~(hello, world)~").to_textile  # => "p. @(hello, world)@\n"
# But delimitted string seem to work
Orgmode::Parser.new("~q(hello, world)~").to_textile  # => "p. @q(hello, world)@\n"
Orgmode::Parser.new("~Q(hello, world)~").to_textile  # => "p. @Q(hello, world)@\n"

So, it looks like something about the delimiters being ruby string delimiters. Hope that helps.

@8dcc
Copy link

8dcc commented Apr 16, 2023

Sucks with lisp because ='symbol= renders literally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants