Skip to content

Support raspberry flavoured markdown#67

Draft
rammodhvadia wants to merge 14 commits intomainfrom
raspberry-flavoured-markdown
Draft

Support raspberry flavoured markdown#67
rammodhvadia wants to merge 14 commits intomainfrom
raspberry-flavoured-markdown

Conversation

@rammodhvadia
Copy link
Copy Markdown

No description provided.

@rammodhvadia rammodhvadia linked an issue Apr 30, 2026 that may be closed by this pull request
3 tasks
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for “RFM” (GitHub-alert-style) Markdown constructs alongside the existing legacy --- block --- RPF syntax, enabling blockquote markers like [!HINT], [!TASK], etc., and fenced code metadata to be parsed into existing RPF HTML components.

Changes:

  • Introduces an RFM parser extension that recognizes [!MARKER] blockquotes and RPF-metadata fenced code blocks.
  • Adds a tree pass to group adjacent RFM hints into a single legacy “hints panel”.
  • Extends the HTML converter and test fixtures/specs to cover the new RFM examples and behavior.

Reviewed changes

Copilot reviewed 38 out of 38 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
spec/kramdown_rpf_spec.rb Adds RFM conversions to fixture-driven tests and adds direct unit-style specs for RFM syntax behaviors.
lib/kramdown_rpf/rpf_helpers.rb Extracts shared conversion helpers for handling Hash-backed RFM elements and code metadata rendering.
lib/kramdown_rpf/rpf.rb Updates converters to accept RFM element shapes (Hash values), adds debug/tip callout conversion, and refactors code conversion via helpers.
lib/kramdown_rpf/rfm_hint_grouping.rb Adds AST pass to group adjacent RFM hint blockquotes into a single :hints element.
lib/kramdown_rpf/rfm.rb Adds RFM parsing for [!...] blockquotes and for fenced code blocks that include RPF metadata attributes.
lib/kramdown_rpf/kramdown.rb Wires in the RFM parser module and adds converter handlers for :debug and :tip; adjusts hint conversion for RFM single-hint panels.
examples/accordion/rfm_accordion.md New example fixture for RFM accordion marker parsing.
examples/accordion/rfm_accordion.html Expected HTML output for RFM accordion example.
examples/accordion/rfm_accordion_with_code.md New example fixture for RFM accordion containing embedded HTML/code.
examples/accordion/rfm_accordion_with_code.html Expected HTML output for accordion-with-code example.
examples/accordion/rfm_accordion_with_space.md New example fixture for RFM accordion embedded within list content/whitespace scenarios.
examples/accordion/rfm_accordion_with_space.html Expected HTML output for accordion-with-space example.
examples/accordion/rfm_accordion_in_challenge.md New example fixture for nested RFM accordion inside an RFM challenge.
examples/accordion/rfm_accordion_in_challenge.html Expected HTML output for accordion-in-challenge example.
examples/challenge/rfm_challenge.md New example fixture for RFM challenge marker parsing.
examples/challenge/rfm_challenge.html Expected HTML output for RFM challenge example.
examples/code/rfm_code_fenced.md New example fixture for fenced code blocks with RPF-style metadata in the info string.
examples/code/rfm_code_fenced.html Expected HTML output for fenced RFM code-with-metadata example.
examples/debug/rfm_debug.md New example fixture for RFM debug callout marker parsing.
examples/debug/rfm_debug.html Expected HTML output for RFM debug callout example.
examples/hint/rfm_hint.md New example fixture for a single RFM hint marker.
examples/hint/rfm_hint.html Expected HTML output for a single RFM hint rendered as a hints panel with one slide.
examples/hint/rfm_hints.md New example fixture for multiple adjacent RFM hints to be grouped.
examples/hint/rfm_hints.html Expected HTML output for grouped RFM hints panel.
examples/no_print/rfm_no_print.md New example fixture for RFM no-print marker parsing.
examples/no_print/rfm_no_print.html Expected HTML output for RFM no-print wrapper example.
examples/print_only/rfm_print_only.md New example fixture for RFM print-only marker parsing.
examples/print_only/rfm_print_only.html Expected HTML output for RFM print-only wrapper example.
examples/save/rfm_save.md New example fixture for RFM save marker parsing.
examples/save/rfm_save.html Expected HTML output for RFM save panel example.
examples/task/rfm_task.md New example fixture for RFM task marker parsing.
examples/task/rfm_task.html Expected HTML output for basic RFM task example.
examples/task/rfm_task_with_hints.md New example fixture for RFM task containing nested RFM hints.
examples/task/rfm_task_with_hints.html Expected HTML output for task-with-hints (grouped hints panel).
examples/task/rfm_task_with_ingredient.md New example fixture for RFM task containing nested RFM accordion ingredient.
examples/task/rfm_task_with_ingredient.html Expected HTML output for task-with-ingredient example.
examples/tip/rfm_tip.md New example fixture for RFM tip callout marker parsing.
examples/tip/rfm_tip.html Expected HTML output for RFM tip callout example.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/kramdown_rpf/rfm.rb
Comment on lines +158 to +165
def parse_codeblock_info_string(info_string)
tokens = shellwords_split(info_string)
language = tokens.shift.to_s
meta = {}

tokens.each do |token|
key, value = token.split('=', 2)
next unless value && CODE_META_KEYS.include?(key)
Comment thread lib/kramdown_rpf/rpf.rb
Comment on lines 1 to 5
# frozen_string_literal: true

require 'kramdown'
require_relative 'rpf_helpers'

Comment thread examples/accordion/rfm_accordion_with_code.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for Raspberry Flavoured Markdown

2 participants