Skip to content

Commit

Permalink
Adopt conventional namespace prefix for markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
joewiz committed Jan 25, 2022
1 parent 6a6fd29 commit 9cd98de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/xar-resources/modules/atomic.xql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ xquery version "3.0";

module namespace atomic="http://atomic.exist-db.org/xquery/atomic";

import module namespace md="http://exist-db.org/xquery/markdown";
import module namespace markdown="http://exist-db.org/xquery/markdown";
import module namespace config="http://exist-db.org/xquery/apps/config" at "config.xqm";

declare namespace atom="http://www.w3.org/2005/Atom";
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, ($md:HTML-CONFIG, $atomic:MD_CONFIG))
let $parsed := markdown:parse($text)
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(), ($md:HTML-CONFIG, $atomic:MD_CONFIG))}</div>
<div>{markdown:parse($content/string())}</div>
default return
$content/node()
return
Expand Down

0 comments on commit 9cd98de

Please sign in to comment.