Class: Deplate::Command::AUTHORNOTE
- Inherits:
-
Deplate::Command
- Object
- Element
- Deplate::Command
- Deplate::Command::AUTHORNOTE
- Defined in:
- lib/deplate/commands.rb
Class Method Summary collapse
Methods inherited from Deplate::Command
commands, #finish, #format_special, #process, register_as, #setup, #setup_command, update_variables
Methods included from Names
name_match_c, name_match_fs, name_match_sf
Methods inherited from Element
#join_lines, #join_lines_re_zh_cn
Class Method Details
.accumulate(src, array, deplate, text, match, args, cmd) ⇒ Object
469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 |
# File 'lib/deplate/commands.rb', line 469 def self.accumulate(src, array, deplate, text, match, args, cmd) Deplate::Core.log('%s: %s' % [cmd, text], :debug, src) unless text.empty? = deplate...last if [:note] = text end end ans = deplate...collect {|h| h[:note]} sep = deplate.variables['authorSep'] || '; ' ans = ans.compact.join(sep) parsed = deplate.parse_with_source(src, ans, false) deplate.set_clip('authornote', Deplate::Element::Clip.new(parsed, deplate, src)) deplate.(src, 'type' => 'metadata', 'name' => 'authornote', 'value' => ans ) end |