mirror of
https://github.com/luau-lang/rfcs.git
synced 2025-04-03 18:10:56 +01:00
Add site config and index
Also fix string interpolation RFC to be compatible with Jekyll
This commit is contained in:
parent
8b942d4c73
commit
7be809109c
4 changed files with 23 additions and 0 deletions
1
docs/CNAME
Normal file
1
docs/CNAME
Normal file
|
@ -0,0 +1 @@
|
||||||
|
rfcs.luau-lang.org
|
5
docs/_config.yml
Normal file
5
docs/_config.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
name: Luau RFCs
|
||||||
|
url: https://rfcs.luau-lang.org
|
||||||
|
markdown: kramdown
|
||||||
|
kramdown:
|
||||||
|
input: GFM
|
13
docs/index.md
Normal file
13
docs/index.md
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# RFCs
|
||||||
|
|
||||||
|
{% assign sortedPages = site.pages | sort: 'title' %}
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
{% for page in sortedPages %}
|
||||||
|
{% assign ext = page.name | split:'.' | last %}
|
||||||
|
{% if ext == 'md' and page.name != 'index.md' %}
|
||||||
|
<li>
|
||||||
|
<a href="{{ page.url }}">{{ page.title }}</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
|
@ -35,7 +35,9 @@ Because we care about backward compatibility, we need some new syntax in order t
|
||||||
* `\` escapes `` ` ``, `{`, and itself `\`.
|
* `\` escapes `` ` ``, `{`, and itself `\`.
|
||||||
* The pairs must be on the same line (unless a `\` escapes the newline) but expressions needn't be on the same line.
|
* The pairs must be on the same line (unless a `\` escapes the newline) but expressions needn't be on the same line.
|
||||||
2. An expression between the braces. This is the value that will be interpolated into the string.
|
2. An expression between the braces. This is the value that will be interpolated into the string.
|
||||||
|
{% raw %}
|
||||||
* Restriction: we explicitly reject `{{` as it is considered an attempt to escape and get a single `{` character at runtime.
|
* Restriction: we explicitly reject `{{` as it is considered an attempt to escape and get a single `{` character at runtime.
|
||||||
|
{% endraw %}
|
||||||
3. Formatting specification may follow after the expression, delimited by an unambiguous character.
|
3. Formatting specification may follow after the expression, delimited by an unambiguous character.
|
||||||
* Restriction: the formatting specification must be constant at parse time.
|
* Restriction: the formatting specification must be constant at parse time.
|
||||||
* In the absence of an explicit formatting specification, the `%*` token will be used.
|
* In the absence of an explicit formatting specification, the `%*` token will be used.
|
||||||
|
@ -98,11 +100,13 @@ print`Hello {name}`
|
||||||
|
|
||||||
> Note: This restriction is likely temporary while we work through string interpolation DSLs, an ability to pass individual components of interpolated strings to a function.
|
> Note: This restriction is likely temporary while we work through string interpolation DSLs, an ability to pass individual components of interpolated strings to a function.
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
The restriction on `{{` exists solely for the people coming from languages e.g. C#, Rust, or Python which uses `{{` to escape and get the character `{` at runtime. We're also rejecting this at parse time too, since the proper way to escape it is `\{`, so:
|
The restriction on `{{` exists solely for the people coming from languages e.g. C#, Rust, or Python which uses `{{` to escape and get the character `{` at runtime. We're also rejecting this at parse time too, since the proper way to escape it is `\{`, so:
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
print(`{{1, 2, 3}} = {myCoolSet}`) -- parse error
|
print(`{{1, 2, 3}} = {myCoolSet}`) -- parse error
|
||||||
```
|
```
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
If we did not apply this as a parse error, then the above would wind up printing as the following, which is obviously a gotcha we can and should avoid.
|
If we did not apply this as a parse error, then the above would wind up printing as the following, which is obviously a gotcha we can and should avoid.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue