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

Translate <<x>> to «‍x» #16

Open
domenic opened this issue Jan 9, 2015 · 9 comments
Open

Translate <<x>> to «‍x» #16

domenic opened this issue Jan 9, 2015 · 9 comments

Comments

@domenic
Copy link
Member

domenic commented Jan 9, 2015

In the latest draft Allen updated the convention for "List literals" to use «‍x» instead of (x).

To make this easier to type we might want to let people type it as ASCII and convert it to the correct Unicode characters.

@bterlson
Copy link
Member

The issue with angle brackets is that they're element-like. <<x>> will probably be parsed as &lt;<x>&gt;</x> by the browser. It would be annoying to type &lt;&lt;x&gt;&gt; for sure, but it would also suck to have to use completely different characters to appease the HTML gods.

We use fancy characters in some places (like <=, >=, etc.) so I wonder if we can get away with just requiring people to paste in the proper character...

@domenic
Copy link
Member Author

domenic commented Jan 23, 2015

I'd be ok with e.g. {{x, y}}. Keyboard-friendly ASCII-authoring seems important.

It kind of sucks that we can't have EMD convert >= to ≥ for you either, hmm.

@bterlson
Copy link
Member

I am not familiar with the relevant algoriths but a > with a space before it and a < with a non-letter character after it seem to be auto-escaped? Perhaps emd can use similar heuristics to know what unescaped < and > characters belong to tags and which don't?

@domenic
Copy link
Member Author

domenic commented Jul 24, 2015

Upon re-visiting this it seems completely fine to me to translate <<x>> EMD source into «‍x» output. We would of course not translate <x> or similar, but two opening <<s with some >>s within the same segment seems like a fine translation.

@bterlson
Copy link
Member

The problem with this is that if the document is first passed through an HTML parser (which is the case for an emu document), <<x>> will be hard to handle since <x> will be parsed as a tag and the whole string possibly even normalized to <<x>></x> per HTML parsing rules.

If we require a space around the list name, eg: << x >>, it could work...

@domenic
Copy link
Member Author

domenic commented Jul 24, 2015

Oh, right... that makes sense. I mean, you could imagine a world where EMD is the outer layer before you get to a HTML parser, but that's a whole can of worms.

OK, reverting to {{ x }} probably. And deprioritizing.

@bterlson
Copy link
Member

is << x >> not better than the curlies?

@domenic
Copy link
Member Author

domenic commented Jul 24, 2015

Whitespace sensitivity always feels meh... Maybe it's fine though? Maybe something to ask the userbase about after getting a bit more experience.

@bterlson
Copy link
Member

MD is already whitespace sensitive in a few places (lists, eg.) and EMD in at least one more place (inside _), so I say it's fine. But I think this is basically super low pri compared to most of the other work items so lets wait on some more experience.

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

No branches or pull requests

2 participants