From 21136ab8db7572c527726f93009b4b72bf00f9a9 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 6 May 2025 16:12:27 +0900 Subject: feat(blog/nuldoc): implement codeblock filename --- .../content/posts/2021-10-02/ruby-detect-running-implementation.dj | 1 + .../blog/content/posts/2021-10-02/ruby-then-keyword-and-case-in.dj | 1 + .../content/posts/2021-10-02/rust-where-are-primitive-types-from.dj | 1 + .../vim-difference-between-autocmd-bufwrite-and-bufwritepre.dj | 5 +++++ vhosts/blog/content/posts/2022-04-09/phperkaigi-2022-tokens.dj | 3 +++ vhosts/blog/content/posts/2023-10-02/compile-php-runtime-to-wasm.dj | 3 ++- 6 files changed, 13 insertions(+), 1 deletion(-) (limited to 'vhosts/blog/content/posts') diff --git a/vhosts/blog/content/posts/2021-10-02/ruby-detect-running-implementation.dj b/vhosts/blog/content/posts/2021-10-02/ruby-detect-running-implementation.dj index 4c73580c..653b7dcd 100644 --- a/vhosts/blog/content/posts/2021-10-02/ruby-detect-running-implementation.dj +++ b/vhosts/blog/content/posts/2021-10-02/ruby-detect-running-implementation.dj @@ -65,6 +65,7 @@ CRuby) については執筆時現在 (2020/12/8) も `'ruby'` [mruby 該当部分のソース](https://github.com/mruby/mruby/blob/ed29d74bfd95362eaeb946fcf7e865d80346b62b/include/mruby/version.h#L32-L35) より引用: +{filename="version.h"} ```c /* * Ruby engine. diff --git a/vhosts/blog/content/posts/2021-10-02/ruby-then-keyword-and-case-in.dj b/vhosts/blog/content/posts/2021-10-02/ruby-then-keyword-and-case-in.dj index 7d8616fc..82d6d9cc 100644 --- a/vhosts/blog/content/posts/2021-10-02/ruby-then-keyword-and-case-in.dj +++ b/vhosts/blog/content/posts/2021-10-02/ruby-then-keyword-and-case-in.dj @@ -143,6 +143,7 @@ Ruby の場合、プログラマーが書きやすいよう改行でもって `t https://github.com/ruby/ruby/blob/221ca0f8281d39f0dfdfe13b2448875384bbf735/parse.y#L3961-L3986 +{filename="parse.y"} ```yacc p_case_body : keyword_in { diff --git a/vhosts/blog/content/posts/2021-10-02/rust-where-are-primitive-types-from.dj b/vhosts/blog/content/posts/2021-10-02/rust-where-are-primitive-types-from.dj index 212cd3d6..9fa61d56 100644 --- a/vhosts/blog/content/posts/2021-10-02/rust-where-are-primitive-types-from.dj +++ b/vhosts/blog/content/posts/2021-10-02/rust-where-are-primitive-types-from.dj @@ -96,6 +96,7 @@ rustc_resolve/src/lib.rs: table.insert(sym::i128, Int(IntTy::I128)); `rustc_resolve` というのはいかにも名前解決を担いそうなクレート名である。該当箇所を見てみる。 +{filename="rustc_resolve/src/lib.rs"} ```rust /// Interns the names of the primitive types. /// diff --git a/vhosts/blog/content/posts/2021-10-02/vim-difference-between-autocmd-bufwrite-and-bufwritepre.dj b/vhosts/blog/content/posts/2021-10-02/vim-difference-between-autocmd-bufwrite-and-bufwritepre.dj index 37af679a..a97337d0 100644 --- a/vhosts/blog/content/posts/2021-10-02/vim-difference-between-autocmd-bufwrite-and-bufwritepre.dj +++ b/vhosts/blog/content/posts/2021-10-02/vim-difference-between-autocmd-bufwrite-and-bufwritepre.dj @@ -53,6 +53,7 @@ vim と neovim のソースコードを調査した。 https://github.com/vim/vim/blob/8e6be34338f13a6a625f19bcef82019c9adc65f2/src/autocmd.c#L85-L86 +{filename="src/autocmd.c"} ```c {"BufAdd", EVENT_BUFADD}, {"BufCreate", EVENT_BUFADD}, @@ -60,6 +61,7 @@ https://github.com/vim/vim/blob/8e6be34338f13a6a625f19bcef82019c9adc65f2/src/aut https://github.com/vim/vim/blob/8e6be34338f13a6a625f19bcef82019c9adc65f2/src/autocmd.c#L95-L97 +{filename="src/autocmd.c"} ```c {"BufRead", EVENT_BUFREADPOST}, {"BufReadCmd", EVENT_BUFREADCMD}, @@ -68,6 +70,7 @@ https://github.com/vim/vim/blob/8e6be34338f13a6a625f19bcef82019c9adc65f2/src/aut https://github.com/vim/vim/blob/8e6be34338f13a6a625f19bcef82019c9adc65f2/src/autocmd.c#L103-L105 +{filename="src/autocmd.c"} ```c {"BufWrite", EVENT_BUFWRITEPRE}, {"BufWritePost", EVENT_BUFWRITEPOST}, @@ -82,6 +85,7 @@ neovim の場合でも同様のマッピングが定義されているが、こ https://github.com/neovim/neovim/blob/71d4f5851f068eeb432af34850dddda8cc1c71e3/src/nvim/auevents.lua#L119-L124 +{filename="src/nvim/auevents.lua"} ```lua aliases = { BufCreate = 'BufAdd', @@ -94,6 +98,7 @@ aliases = { ところで、上では取り上げなかった `FileEncoding` だが、これは `:help FileEncoding` にしっかりと書いてある。 +{filename=":help FileEncoding"} ``` *FileEncoding* FileEncoding Obsolete. It still works and is equivalent diff --git a/vhosts/blog/content/posts/2022-04-09/phperkaigi-2022-tokens.dj b/vhosts/blog/content/posts/2022-04-09/phperkaigi-2022-tokens.dj index e0fe0279..39565833 100644 --- a/vhosts/blog/content/posts/2022-04-09/phperkaigi-2022-tokens.dj +++ b/vhosts/blog/content/posts/2022-04-09/phperkaigi-2022-tokens.dj @@ -32,6 +32,7 @@ remark = "2問目、3問目の解説を追加、1問目に加筆" ソースコードはこちら。実行には PHP 8.1 以上が必要なので注意。 +{filename="brainf_ck.php"} ```php