- Notifications
You must be signed in to change notification settings - Fork 1k
/
Copy pathmdoc_replace.rb
24 lines (21 loc) · 708 Bytes
/
mdoc_replace.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
moduleJekyll
classMdocConverter < Converter
safefalse
priority:high
defmatches(ext)
ext =~ /^\.(md|markdown)$/i
end
defoutput_ext(ext)
".html"
end
defconvert(content)
content=content.gsub("```scala mdoc:compile-only\n","```scala\n")
content=content.gsub("```scala mdoc:fail\n","```scala\n")
content=content.gsub("```scala mdoc:crash\n","```scala\n")
content=content.gsub("```scala mdoc:nest\n","```scala\n")
content=content.gsub("```scala mdoc:reset:crash\n","```scala\n")
content=content.gsub("```scala mdoc:reset\n","```scala\n")
content.gsub("```scala mdoc\n","```scala\n")
end
end
end