Comments (16)
%Math_pow%(_base_, _exponent_)
showed up in https://github.com/rwaldron/exponentiation-operator/blob/master/spec/index.html
Can we do this better via some heuristic? E.g. variables are not allowed to contain %
and (
? I like that idea.
from ecmarkdown.
You could say that %
is yet another format-delimiter, so %Math_pow%
is recognized as a percent-format, preventing _pow%(_
from being mis-recognized as an underscore-format.
from ecmarkdown.
Mind you, it is a good idea to restrict the characters allowed in an underscore-format. In the ES spec, I think the only characters in metavariable names are [A-Za-z12]
.
from ecmarkdown.
Should I only accept [\w\d] inside var maybe?
from ecmarkdown.
Careful: \w includes underscore, which you don't want to allow.
from ecmarkdown.
Lol. Good point. But I want to allow word-like Unicode characters... what's the best way to do this?
from ecmarkdown.
In a JavaScript RegExp? I think the only way to do it is to enumerate the code-point ranges, which I imagine would be a pain.
But why would you need anything other than [A-Za-z0-9]
? Is someone going to write ES proposal pseudocode in a language other than English?
from ecmarkdown.
Maybe? :P But I'll go with your suggested ranges for now.
from ecmarkdown.
tc39/ecmarkup#27 implies we should allow <
and >
in the set as well. (I assume ecmarkup passes ecmarkdown <key>
, not <key>
.)
from ecmarkdown.
Currently Emu passes <key>
but it needs to pass <key>
if that's what was written in the source document. Reason being that <key>
is clearly an element when the author clearly did not intend that when they wrote the escape characters.
But what is this <key>
convention anyway, @caridy?
from ecmarkdown.
Currently Emu passes
<key>
but it needs to pass<key>
if that's what was written in the source document.
Yeah I guess this comes down to what level EMD operates at. And we're moving away from it operating on small slices of textContent, instead toward it operating on larger chunks of HTML/EMU. So I agree with you. I guess the allowed set then includes &
and ;
(and maybe #
); good times.
It would be nicer to eliminate variables with <
and >
in them though.
from ecmarkdown.
Thoughts on the following:
_foo_bar_ ==> <var>foo_bar</var> or _foo_bar_
from ecmarkdown.
I would have thought <var>foo</var>bar_
. The first five characters parse great as a variable.
from ecmarkdown.
The middle _ is not a valid format end since it is followed by alpha-numeric characters. But is what you suggest desirable? I can do that too.
from ecmarkdown.
I think it is... We specifically want to allow intra-word variables like _SIMD_Constructor
, so this seems to follow automatically.
from ecmarkdown.
Hmmmm, ok. I had thought SIMD was a sigil they wanted to emit as-is in the output doc (rather than wrapping in var and removing underscores).
from ecmarkdown.
Related Issues (20)
- Make sure docs are consistent and complete HOT 1
- Link syntax HOT 3
- where does a segment end? HOT 19
- Tags not included in AST
- Fix parse error for dedenting lists
- ordered list (alg. fragment) begins with non-decimal item number HOT 4
- Blank line leads to blank section HOT 2
- Need guidance on what constructs to use when HOT 8
- __proto__ converts to <var></var>proto__ HOT 1
- Double-decoding issue leading to difficulty to output `<!` in emu-grammar HOT 3
- Documents hang forever if there is no newline at the end HOT 3
- Need an interactive demo page
- Add support for adding labels (ids) to steps HOT 4
- Consider dropping support for full documents HOT 2
- Handle CRLF HOT 3
- parabreak processing breaks spec rendering HOT 4
- Tag new Version HOT 2
- js-beautify is using old version causes error [simple fix] [pull request submited] HOT 10
- Re-tag new version HOT 7
- Fields and slots should be eligible for ecmarkup interactive highlighting
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ecmarkdown.