mirror of
https://github.com/status-im/NimYAML.git
synced 2025-03-03 12:20:37 +00:00
Numeric sorting also for snippet files
This commit is contained in:
parent
9f7e87e935
commit
5d4ec6c43f
@ -85,21 +85,21 @@ proc outputExamples(curPath: string, level: int = 0) =
|
||||
case codeFiles.len
|
||||
of 0: discard
|
||||
of 1:
|
||||
let (nullPath, name, extension) = codeFiles[0].splitFile()
|
||||
let (_, _, extension) = codeFiles[0].splitFile()
|
||||
append(".. code:: " & extension[1..^1])
|
||||
append(" :file: " & (curPath / codeFiles[0]) & '\l')
|
||||
of 2:
|
||||
append(".. raw:: html")
|
||||
append(" <table class=\"quickstart-example\"><thead><tr>")
|
||||
for codeFile in codeFiles:
|
||||
append(" <th>" & codeFile & "</th>")
|
||||
append(" <th>" & codeFile[3..^1] & "</th>")
|
||||
append(" </th></tr></thead><tbody><tr><td>\n")
|
||||
|
||||
var first = true
|
||||
for codeFile in codeFiles:
|
||||
if first: first = false
|
||||
else: append(".. raw:: html\n </td>\n <td>\n")
|
||||
let (nullPath, name, extension) = codeFile.splitFile()
|
||||
let (_, _, extension) = codeFile.splitFile()
|
||||
append(".. code:: " & extension[1..^1])
|
||||
append(" :file: " & (curPath / codeFile) & '\l')
|
||||
|
||||
|
1
doc/snippets/quickstart/00/title
Normal file
1
doc/snippets/quickstart/00/title
Normal file
@ -0,0 +1 @@
|
||||
Dumping Nim objects as YAML
|
@ -1 +1 @@
|
||||
Dumping Nim objects as YAML
|
||||
Loading Nim objects from YAML
|
||||
|
@ -1 +1 @@
|
||||
Loading Nim objects from YAML
|
||||
Customizing output style
|
||||
|
@ -1 +1 @@
|
||||
Customizing output style
|
||||
Dumping reference types and cyclic structures
|
||||
|
@ -1 +1 @@
|
||||
Dumping reference types and cyclic structures
|
||||
Loading reference types and cyclic structures
|
||||
|
@ -1 +1 @@
|
||||
Loading reference types and cyclic structures
|
||||
Defining a custom tag uri for a type
|
||||
|
@ -1 +1 @@
|
||||
Defining a custom tag uri for a type
|
||||
Dumping Nim objects as JSON
|
||||
|
@ -1 +1 @@
|
||||
Dumping Nim objects as JSON
|
||||
Loading Nim objects from JSON
|
||||
|
@ -1 +1 @@
|
||||
Loading Nim objects from JSON
|
||||
Processing a Sequence of Heterogeneous Items
|
||||
|
@ -1 +0,0 @@
|
||||
Processing a Sequence of Heterogeneous Items
|
Loading…
x
Reference in New Issue
Block a user