Skip to content

Commit

Permalink
Merge pull request #130 from lostenderman/all-fenced-codes
Browse files Browse the repository at this point in the history
Fenced codes
  • Loading branch information
lostenderman authored Mar 31, 2023
2 parents 9d5f3c4 + e98bf58 commit 8b48b4a
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions markdown.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -25996,14 +25996,18 @@ M.extensions.fenced_code = function(blank_before_code_fence,
return #a >= #b and i
end

local tilde_infostring
= C((parsers.linechar
- (parsers.spacechar^1 * parsers.newline))^0)

local backtick_infostring
= C((parsers.linechar
- (parsers.backtick
+ parsers.spacechar^1 * parsers.newline))^0)
local function strip_enclosing_whitespaces(str)
return str:gsub("^%s*(.-)%s*$", "%1")
end

local tilde_infostring = Cs(( parsers.anyescaped
- parsers.newline)^0
/ strip_enclosing_whitespaces)

local backtick_infostring = Cs(((-#(parsers.backslash * parsers.backtick) * parsers.anyescaped)
- parsers.newline
- parsers.backtick)^0
/ strip_enclosing_whitespaces)

local fenceindent
local fencehead = function(char, infostring)
Expand Down

0 comments on commit 8b48b4a

Please sign in to comment.