feat: add merge_all_wren utility, strutil demo, and 7 new API manual pages
Add WrenFileReader class in apps/merge_all_wren.wren for recursive .wren file discovery and content printing. Introduce example/strutil_demo.wren demonstrating case conversion, hex encoding, SHA256 hashing, string repetition, padding, HTML/JSON escaping, and URL encoding/decoding. Create manual/api pages for argparse, dataset, html, markdown, uuid, wdantic, and web modules. Update manual/api/index.html sidebar and module count from 21 to 28, adding links and cards for the new modules.
This commit is contained in:
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
// retoor <retoor@molodetz.nl>
|
||||
|
||||
import "markdown" for Markdown
|
||||
|
||||
var multi = Markdown.toHtml("[First](http://a.com) and [Second](http://b.com)")
|
||||
System.print(multi.contains("<a href=\"http://a.com\">First</a>")) // expect: true
|
||||
System.print(multi.contains("<a href=\"http://b.com\">Second</a>")) // expect: true
|
||||
|
||||
var withPath = Markdown.toHtml("[Docs](/docs/api/index.html)")
|
||||
System.print(withPath.contains("<a href=\"/docs/api/index.html\">Docs</a>")) // expect: true
|
||||
|
||||
var imgAlt = Markdown.toHtml("")
|
||||
System.print(imgAlt.contains("<img src=\"cat.jpg\" alt=\"A cat\">")) // expect: true
|
||||
|
||||
var imgUrl = Markdown.toHtml("")
|
||||
System.print(imgUrl.contains("<img src=\"https://example.com/logo.png\" alt=\"Logo\">")) // expect: true
|
||||
|
||||
var textAround = Markdown.toHtml("Click [here](url) now")
|
||||
System.print(textAround.contains("Click ")) // expect: true
|
||||
System.print(textAround.contains("<a href=\"url\">here</a>")) // expect: true
|
||||
System.print(textAround.contains(" now")) // expect: true
|
||||
Reference in New Issue
Block a user