lib/constants.rb in markdown_exec-1.8.5 vs lib/constants.rb in markdown_exec-1.8.6

- old
+ new

@@ -1,16 +1,24 @@ #!/usr/bin/env ruby # frozen_string_literal: true # encoding=utf-8 +require_relative 'block_types' + class ExecutionStreams StdErr = :stderr StdIn = :stdin StdOut = :stdout end +IndexedLine = Struct.new(:index, :line) do + def to_s + line + end +end + class LoadFile Load = true Reuse = false end @@ -32,15 +40,24 @@ BACK = :back CONTINUE = :continue EXIT = :exit end +# a struct to hold the data for a single line +NestedLine = Struct.new(:text, :depth) do + def to_s + text + end +end + # selected block and subsequent menu state # SelectedBlockMenuState = Struct.new(:block, :state) SHELL_COLOR_OPTIONS = { BlockType::BASH => :menu_bash_color, BlockType::LINK => :menu_link_color, BlockType::OPTS => :menu_opts_color, BlockType::VARS => :menu_vars_color }.freeze + +### Struct.new(:state, :block)