Skip to content

Commit

Permalink
WEB-7274: Making the text description field markdown aware
Browse files Browse the repository at this point in the history
  • Loading branch information
sammyd committed Aug 16, 2024
1 parent 0bf38d1 commit ff4ffd8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/lib/parser/text_metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Parser
class TextMetadata
include MarkdownMetadata

VALID_SIMPLE_ATTRIBUTES = %i[title description short_description free ref authors_notes_md].freeze
VALID_SIMPLE_ATTRIBUTES = %i[title description_md short_description free ref authors_notes_md].freeze

attr_reader :text

Expand Down
3 changes: 2 additions & 1 deletion app/models/text.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ class Text
include Concerns::MarkdownRenderable
include Concerns::TitleCleanser

attr_accessor :title, :ordinal, :ref, :description, :authors, :markdown_file, :root_path, :free, :kind
attr_accessor :title, :ordinal, :ref, :description_md, :authors, :markdown_file, :root_path, :free, :kind

attr_markdown :body, source: :markdown_file, file: true, wrapper_class: :wrapper_class
attr_markdown :description, source: :description_md, file: false
validates :title, :ordinal, :ref, :markdown_file, presence: true
validate do |text|
# Check the ref is a string
Expand Down

0 comments on commit ff4ffd8

Please sign in to comment.