了解 Julia 中的告诫

Understanding Admonitions in Julia

我试着理解Admonitions in Julia

当我尝试时:

julia> !!! warning "test"
ERROR: syntax: extra token """ after end of expression
Stacktrace:
 [1] top-level scope at none:1

我做错了什么?它在 .jl 文件中也不起作用

julia> include("main.jl")
[ Info: Loading JuMP
[ Info: Loading Gurobi
ERROR: LoadError: LoadError: syntax: extra token "test" after end of expression

警告仅在 markdown 中有效,例如在 md-string:

julia> using Markdown

julia> md"""
       !!! warning "test"
           This is a test warning.
       """