Skip to content

Commit

Permalink
Fix call to markdown parser to work with eXist 3.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfgangmm committed Jan 1, 2018
1 parent 9c6d5df commit 601719d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
20 changes: 20 additions & 0 deletions .existdb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"servers": {
"localhost": {
"server": "http://localhost:8080/exist",
"user": "admin",
"password": ""
}
},
"sync": {
"server": "localhost",
"root": "/db/apps/wiki",
"active": true,
"ignore": [
".existdb.json",
".git/**",
"node_modules/**",
"bower_components/**"
]
}
}
6 changes: 3 additions & 3 deletions modules/atomic.xql
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ declare function atomic:process-img($node as element()) {
$config:base-url || $src
else
$src

return
element { node-name($node) } {
$node/@* except ($node/@alt, $node/@src, $node/@class),
Expand Down Expand Up @@ -101,7 +101,7 @@ declare function atomic:get-content($content as element(atom:content)?, $eval as
xs:anyURI($path)
case "markdown" return
let $text := util:binary-to-string(util:binary-doc($path))
let $parsed := md:parse($text, $atomic:MD_CONFIG)
let $parsed := md:parse($text, ($md:HTML-CONFIG, $atomic:MD_CONFIG))
return
<div>{$parsed}</div>
default return
Expand All @@ -111,7 +111,7 @@ declare function atomic:get-content($content as element(atom:content)?, $eval as
case "html" case "xhtml" return
$content/*
case "markdown" return
<div>{md:parse($content/string(), $atomic:MD_CONFIG)}</div>
<div>{md:parse($content/string(), ($md:HTML-CONFIG, $atomic:MD_CONFIG))}</div>
default return
$content/node()
return
Expand Down

0 comments on commit 601719d

Please sign in to comment.