Skip to content

Commit 58f31d3

Browse files
committed
Fix syntax highlighted code blocks in lists (translations)
See commit 3f55b00.
1 parent 3f55b00 commit 58f31d3

File tree

4 files changed

+76
-56
lines changed

4 files changed

+76
-56
lines changed

es/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ y procesar definiciones de tipos escritas en RBS.
3232

3333
El siguiente es un pequeño ejemplo de RBS.
3434

35-
{% highlight rbs %}
35+
``` rbs
3636
module AplicacionMensajeria
3737
VERSION: String
3838
@@ -47,7 +47,7 @@ module AplicacionMensajeria
4747
| (File, de: Usuaurio | Robot) -> Mensaje
4848
end
4949
end
50-
{% endhighlight %}
50+
```
5151

5252
Ver más detalles en el
5353
[archivo README de la gema rbs](https://github.com/ruby/rbs).
@@ -77,7 +77,7 @@ El siguiente pequeño programa calcula `prime?` en paralelo con dos
7777
ractores y es casi 2 veces más rápido con dos o más núcleos
7878
que el programa secuencial.
7979

80-
{% highlight ruby %}
80+
``` ruby
8181
require 'prime'
8282

8383
# n.prime? con enteros enviados en r1, r2 que corren en paralelo
@@ -95,7 +95,7 @@ r2.send 2**61 + 15
9595
# wait for the results of expr1, expr2
9696
p r1.take #=> true
9797
p r2.take #=> true
98-
{% endhighlight %}
98+
```
9999

100100
Ver más detalles en
101101
[doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md).
@@ -134,32 +134,36 @@ versión prevía.
134134
## Otras características notables
135135

136136
* Se agrega una asignación al lado derecho.
137-
{% highlight ruby %}
137+
138+
``` ruby
138139
fib(10) => x
139140
p x #=> 55
140-
{% endhighlight %}
141+
```
141142

142143
* Se agrega una definición de métodos que no requiere `end`.
143-
{% highlight ruby %}
144+
145+
``` ruby
144146
def cuadrado(x) = x * x
145-
{% endhighlight %}
147+
```
146148
147149
* Se agrega un patrón Encontrar (__Find__).
148-
{% highlight ruby %}
150+
151+
``` ruby
149152
case ["a", 1, "b", "c", 2, "d", "e", "f", 3]
150153
in [*pre, String => x, String => y, *post]
151154
p pre #=> ["a", 1]
152155
p x #=> "b"
153156
p y #=> "c"
154157
p post #=> [2, "d", "e", "f", 3]
155158
end
156-
{% endhighlight %}
159+
```
157160
158161
* `Hash#except` ahora es un método incorporado.
159-
{% highlight ruby %}
162+
163+
``` ruby
160164
h = { a: 1, b: 2, c: 3 }
161165
p h.except(:a) #=> {:b=>2, :c=>3}
162-
{% endhighlight %}
166+
```
163167

164168
* Se agrega como característica experimental __Memory view__
165169

@@ -185,11 +189,12 @@ versión prevía.
185189
funcionará. Ver detalles en la
186190
[documentación](https://www.ruby-lang.org/es/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/).
187191
* Por cierto, el re-envío de argumentos ahora soporta argumentos principales.
188-
{% highlight ruby %}
192+
193+
``` ruby
189194
def method_missing(meth, ...)
190195
send(:"do_#{ meth }", ...)
191196
end
192-
{% endhighlight %}
197+
```
193198

194199
* La característica `$SAFE` se eliminó por completo; ahora es una variable
195200
global normal.

ko/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ RBS의 목표는 루비 프로그램에서 흔히 보이는 패턴을 지원하
2323

2424
다음은 RBS의 작은 예시입니다.
2525

26-
{% highlight rbs %}
26+
``` rbs
2727
module ChatApp
2828
VERSION: String
2929
@@ -38,7 +38,7 @@ module ChatApp
3838
| (File, from: User | Bot) -> Message
3939
end
4040
end
41-
{% endhighlight %}
41+
```
4242

4343
더 자세한 내용은 [rbs 젬의 README](https://github.com/ruby/rbs)를 확인하세요.
4444

@@ -55,7 +55,7 @@ ractor 간의 통신은 메시지 넘기기를 통해서 지원됩니다.
5555

5656
다음은 `prime?`을 2개의 ractor를 통해 계산하는 프로그램입니다. 이는 2개 이상의 코어를 사용하는 경우, 순차적으로 실행하는 프로그램보다 약 2배 빠릅니다.
5757

58-
{% highlight ruby %}
58+
``` ruby
5959
require 'prime'
6060

6161
# r1, r2에 보낸 정수들로 'n.prime?'을 병렬 실행
@@ -73,7 +73,7 @@ r2.send 2**61 + 15
7373
# r1, r2의 실행 결과 대기
7474
p r1.take #=> true
7575
p r2.take #=> true
76-
{% endhighlight %}
76+
```
7777

7878
더 자세한 내용은 [doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md)를 확인하세요.
7979

@@ -102,32 +102,36 @@ p r2.take #=> true
102102
## 그 이외의 주목할 만한 기능
103103

104104
* 오른쪽으로 값을 할당하는 명령이 추가됩니다.
105-
{% highlight ruby %}
105+
106+
``` ruby
106107
fib(10) => x
107108
p x #=> 55
108-
{% endhighlight %}
109+
```
109110

110111
* `end` 없는 메서드 정의가 추가됩니다.
111-
{% highlight ruby %}
112+
113+
``` ruby
112114
def square(x) = x * x
113-
{% endhighlight %}
115+
```
114116
115117
* 검색 패턴이 추가됩니다.
116-
{% highlight ruby %}
118+
119+
``` ruby
117120
case ["a", 1, "b", "c", 2, "d", "e", "f", 3]
118121
in [*pre, String => x, String => y, *post]
119122
p pre #=> ["a", 1]
120123
p x #=> "b"
121124
p y #=> "c"
122125
p post #=> [2, "d", "e", "f", 3]
123126
end
124-
{% endhighlight %}
127+
```
125128
126129
* `Hash#except`가 내장됩니다.
127-
{% highlight ruby %}
130+
131+
``` ruby
128132
h = { a: 1, b: 2, c: 3 }
129133
p h.except(:a) #=> {:b=>2, :c=>3}
130-
{% endhighlight %}
134+
```
131135

132136
* 메모리 뷰가 실험적인 기능으로 추가됩니다.
133137

@@ -142,11 +146,12 @@ p r2.take #=> true
142146
* 키워드 인자가 다른 인자들로부터 분리됩니다.
143147
* 원칙적으로 루비 2.7에서 경고를 출력하는 코드는 동작하지 않습니다. 자세한 내용은 [문서](https://www.ruby-lang.org/ko/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/)를 확인하세요.
144148
* 한편, 인자를 전달할 때 앞쪽 인자를 사용할 수 있습니다.
145-
{% highlight ruby %}
149+
150+
``` ruby
146151
def method_missing(meth, ...)
147152
send(:"do_#{ meth }", ...)
148153
end
149-
{% endhighlight %}
154+
```
150155

151156
* `$SAFE` 기능이 완전히 제거됩니다. 이 값은 이제 일반 전역 변수입니다.
152157

pt/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Ruby 3.0 vem com gem `rbs`, que permite analisar e processar definições de tip
2323

2424
A seguir está um pequeno exemplo de RBS.
2525

26-
{% highlight rbs %}
26+
``` rbs
2727
module ChatApp
2828
VERSION: String
2929
@@ -38,7 +38,7 @@ module ChatApp
3838
| (File, from: User | Bot) -> Message
3939
end
4040
end
41-
{% endhighlight %}
41+
```
4242

4343
Veja [README da gem rbs](https://github.com/ruby/rbs) para mais detalhes.
4444

@@ -54,7 +54,7 @@ A especificação e implementação não estão amadurecidas e serão alteradas
5454

5555
O pequeno programa a seguir calcula `prime?` em paralelo com dois ractores e cerca de x2 vezes mais rápido com dois ou mais núcleos do que o programa sequencial.
5656

57-
{% highlight ruby %}
57+
``` ruby
5858
require 'prime'
5959

6060
# n.prime? com inteiros r1 e r2 enviados rodando em parelelo
@@ -72,7 +72,7 @@ r2.send 2**61 + 15
7272
# aguardando os resultados de expr1, expr2
7373
p r1.take #=> true
7474
p r2.take #=> true
75-
{% endhighlight %}
75+
```
7676

7777
Veja [doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md) para mais detalhes.
7878

@@ -99,32 +99,36 @@ Atualmente, existe um agendador de teste disponível em [`Async::Scheduler`](htt
9999
## Outros novos recursos notáveis
100100

101101
* A instrução de atribuição para a direita foi adicionada.
102-
{% highlight ruby %}
102+
103+
``` ruby
103104
fib(10) => x
104105
p x #=> 55
105-
{% endhighlight %}
106+
```
106107

107108
* A definição de método sem a keyword _end_ foi adicionada.
108-
{% highlight ruby %}
109+
110+
``` ruby
109111
def square(x) = x * x
110-
{% endhighlight %}
112+
```
111113
112114
* Find pattern foi adicionada.
113-
{% highlight ruby %}
115+
116+
``` ruby
114117
case ["a", 1, "b", "c", 2, "d", "e", "f", 3]
115118
in [*pre, String => x, String => y, *post]
116119
p pre #=> ["a", 1]
117120
p x #=> "b"
118121
p y #=> "c"
119122
p post #=> [2, "d", "e", "f", 3]
120123
end
121-
{% endhighlight %}
124+
```
122125
123126
* `Hash#except` agora é nativo.
124-
{% highlight ruby %}
127+
128+
``` ruby
125129
h = { a: 1, b: 2, c: 3 }
126130
p h.except(:a) #=> {:b=>2, :c=>3}
127-
{% endhighlight %}
131+
```
128132

129133
* A visualização da memória é adicionada como um recurso experimental
130134

@@ -139,11 +143,12 @@ Atualmente, existe um agendador de teste disponível em [`Async::Scheduler`](htt
139143
* Os argumentos de palavra-chave são separados de outros argumentos.
140144
* Em princípio, códigos que imprimem um aviso no Ruby 2.7 não funciona. Veja o [documento](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/) em detalhe.
141145
* A propósito, o encaminhamento de argumentos agora suporta argumentos principais.
142-
{% highlight ruby %}
146+
147+
``` ruby
143148
def method_missing(meth, ...)
144149
send(:"do_#{ meth }", ...)
145150
end
146-
{% endhighlight %}
151+
```
147152

148153
* O recurso de `$SAFE` foi completamente removido; agora é uma variável global normal.
149154

tr/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Ruby 3.0 `rbs` gem'i ile gelmektedir, bu gem RBS ile yazılmış tip tanımları
2525

2626
Aşağıdaki kod RBS için küçük bir örnektir.
2727

28-
{% highlight rbs %}
28+
``` rbs
2929
module ChatApp
3030
VERSION: String
3131
@@ -40,7 +40,7 @@ module ChatApp
4040
| (File, from: User | Bot) -> Message
4141
end
4242
end
43-
{% endhighlight %}
43+
```
4444

4545
Daha fazla ayrıntı için [rbs gem'inin README](https://github.com/ruby/rbs)'sine bakınız.
4646

@@ -58,7 +58,7 @@ Belirtim ve gerçekleme henüz tam oturmamıştır ve ileride değişecektir, bu
5858

5959
Aşağıdaki küçük program `prime?`'ı iki ractor ile paralelde hesaplar ve iki ya da daha fazla çekirdekte ardışık bir programa göre aşağı yukarı 2 kat daha hızlıdır.
6060

61-
{% highlight ruby %}
61+
``` ruby
6262
require 'prime'
6363

6464
# r1 ve r2'deki, tamsayıların gönderildiği n.prime? paralelde çalışır
@@ -76,7 +76,7 @@ r2.send 2**61 + 15
7676
# 1. ve 2. deyimin sonuçlarını bekle
7777
p r1.take #=> true
7878
p r2.take #=> true
79-
{% endhighlight %}
79+
```
8080

8181
Daha fazla ayrıntı için [doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md)'ye bakınız.
8282

@@ -106,32 +106,36 @@ Daha fazla ayrıntı için [`doc/scheduler.md`](https://github.com/ruby/ruby/blo
106106
## Diğer Dikkate Değer Yeni Özellikler
107107

108108
* Sağ atama ifadesi eklendi.
109-
{% highlight ruby %}
109+
110+
``` ruby
110111
fib(10) => x
111112
p x #=> 55
112-
{% endhighlight %}
113+
```
113114

114115
* Sonsuz metod tanımı eklendi.
115-
{% highlight ruby %}
116+
117+
``` ruby
116118
def square(x) = x * x
117-
{% endhighlight %}
119+
```
118120
119121
* Bulma deseni eklendi.
120-
{% highlight ruby %}
122+
123+
``` ruby
121124
case ["a", 1, "b", "c", 2, "d", "e", "f", 3]
122125
in [*pre, String => x, String => y, *post]
123126
p pre #=> ["a", 1]
124127
p x #=> "b"
125128
p y #=> "c"
126129
p post #=> [2, "d", "e", "f", 3]
127130
end
128-
{% endhighlight %}
131+
```
129132
130133
* `Hash#except` şimdi gömülü.
131-
{% highlight ruby %}
134+
135+
``` ruby
132136
h = { a: 1, b: 2, c: 3 }
133137
p h.except(:a) #=> {:b=>2, :c=>3}
134-
{% endhighlight %}
138+
```
135139

136140
* Hafıza görünümü deneysel bir özellik olarak eklendi.
137141

@@ -151,11 +155,12 @@ Ayrıntılar için NEWS'e bakınız.
151155
* Prensipte, Ruby 2.7'de bir uyarı yazdıran kod çalışmayacaktır.
152156
Ayrıntılar için [belgeye](https://www.ruby-lang.org/tr/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/) bakınız.
153157
* Bu arada argüman yönlendirme artık sondaki argümanları da destekliyor.
154-
{% highlight ruby %}
158+
159+
``` ruby
155160
def method_missing(meth, ...)
156161
send(:"do_#{ meth }", ...)
157162
end
158-
{% endhighlight %}
163+
```
159164
160165
* `$SAFE` özelliği tamamiyle silindi; şimdi sadece normal bir global değişken.
161166

0 commit comments

Comments
 (0)