Sha256: 513b04bfc90d5309b1e65d6e9ac0a941b9c3a3bfde3f1b166fd761a660550ed6
Contents?: true
Size: 693 Bytes
Versions: 21
Compression:
Stored size: 693 Bytes
Contents
module Expressir module ExpressExp module HyperlinkFormatter def format_expressions_simple_reference(node) return node.id unless node.base_path # find closest node with path current_node = node while !current_node.path current_node = current_node.parent end # skip if this reference and target node are in the same node with path node_base_path_parts = node.base_path.split(".") current_node_path_parts = current_node.path.split(".") return node.id if node_base_path_parts[0..1] == current_node_path_parts[0..1] "{{{<<express:#{node.base_path},#{node.id}>>}}}" end end end end
Version data entries
21 entries across 21 versions & 1 rubygems