xowiki::Page instproc substitute_markup

 <instance of xowiki::Page[i]> substitute_markup

Defined in

Partial Call Graph (max 5 caller/called nodes):
%3 test_nested_self_references nested_self_references (test ) xowiki::Page instproc substitute_markup xowiki::Page instproc substitute_markup test_nested_self_references->xowiki::Page instproc substitute_markup test_xowiki xowiki (test ) test_xowiki->xowiki::Page instproc substitute_markup ad_enhanced_text_to_html ad_enhanced_text_to_html (public) xowiki::Page instproc substitute_markup->ad_enhanced_text_to_html ad_try ad_try (public) xowiki::Page instproc substitute_markup->ad_try

Testcases:
nested_self_references, xowiki
Source code:
if {${:mime_type} eq "text/enhanced"} {
  set content [ad_enhanced_text_to_html $content]
}
if {!${:do_substitutions}} {
  return $content
}
#
# The provided content and the returned result are strings
# containing HTML (unless we have other rich-text encodings).
#
# First get the potentially class specific regular expression
# definitions.
#
set baseclass [expr {[[:info class] exists RE] ? [:info class] : [self class]}]
$baseclass instvar RE markupmap
#:log "-- baseclass for RE = $baseclass"

#
# Secondly, iterate line-wise over the text.
#
set output ""
set l ""

ad_try {
  if {$context_obj ne ""} {
    :set_resolve_context  -package_id [$context_obj package_id] -parent_id [$context_obj item_id]
    set :__ignore_self_in_links 1
  }

  foreach l0 [split $content \n] {
    append l [string map $markupmap(escape) $l0]
    if {[string first \{\{ $l] > -1 && [string first \}\} $l] == -1} {append l " "continue}
    set l [:regsub_eval $RE(anchor)  $l {:anchor  "\1""1"]
    set l [:regsub_eval $RE(div)     $l {:div     "\1"}]
    set l [:regsub_eval $RE(include) $l {:include_content "\1" "\2"}]
    #regsub -all -- $RE(clean) $l {\1} l
    regsub -all -- $RE(clean2) $l { \1} l
    set l [string map $markupmap(unescape) $l]
    append output $l \n
    set l ""
  }
} on error {errorMsg} {
  error $errorMsg
} finally {
  if {$context_obj ne ""} {
    unset :__ignore_self_in_links
    :reset_resolve_context
  }
}
#:log "--substitute_markup returns $output"
return $output
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: