diff --git a/docs/_includes/custom/xpath_fun_doc.html b/docs/_includes/custom/xpath_fun_doc.html index 5865e37f0e..12a7781adf 100644 --- a/docs/_includes/custom/xpath_fun_doc.html +++ b/docs/_includes/custom/xpath_fun_doc.html @@ -38,7 +38,9 @@
-

+ + +

{{ lang.ns | append: ':' }}{{ fun.name }}{{ fun | xpath_fun_type }} @@ -47,26 +49,24 @@
-
{{ fun.description }}
+
{{ fun.description | render_markdown }}
Remarks
-
{{ fun.notes }}
+
{{ fun.notes | render_markdown }}
{% if fun.parameters.size > 0 %}
Parameters
-
-
- {% for param in fun.parameters %} -
- {{ param.name }} - as {{ param.type }} -
-
{{ param.description }}
- {% endfor %} -
-
+
+ {% for param in fun.parameters %} +
+ {{ param.name }} + as {{ param.type }} +
+
{{ param.description | render_markdown }}
+ {% endfor %} +
{% endif %} @@ -76,14 +76,12 @@
Examples
-
-
- {% for example in fun.examples %} -
{{ example.code }}
-
{% render %}{{ example.outcome }}{%endrender%}
- {% endfor %} -
-
+
+ {% for example in fun.examples %} +
{{ example.code }}
+
{{ example.outcome | render_markdown }}
+ {% endfor %} +
{% endif %}
diff --git a/docs/_plugins/custom_filters.rb b/docs/_plugins/custom_filters.rb index 2b3067e21a..c3cdec7a0a 100644 --- a/docs/_plugins/custom_filters.rb +++ b/docs/_plugins/custom_filters.rb @@ -1,3 +1,5 @@ +require 'kramdown' + module CustomFilters # set intersection @@ -44,6 +46,10 @@ module CustomFilters end + def render_markdown(text) + Kramdown::Document.new(text).to_html + end + def xpath_fun_type(fun_yaml) res = '('