Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle notes in emphasis #159

Merged
merged 6 commits into from
Jun 29, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix luacheck global variable issue
  • Loading branch information
lostenderman committed Jun 16, 2024
commit 1ca9ea0eb07d3356f6ca7ec8cf6d623ec1cd340a
12 changes: 8 additions & 4 deletions markdown.dtx
Original file line number Diff line number Diff line change
@@ -28556,6 +28556,9 @@ function M.reader.new(writer, options)
-- List of references defined in the document
local references

-- List of note references defined in the codument
parsers.rawnotes = {}

% \end{macrocode}
% \par
% \begin{markdown}
@@ -28603,7 +28606,7 @@ function M.reader.new(writer, options)
% \end{markdown}
% \begin{macrocode}
function self.lookup_note_reference(tag)
return rawnotes[self.normalize_tag(tag)]
return parsers.rawnotes[self.normalize_tag(tag)]
end

parsers.title_s_direct_ref = parsers.squote
@@ -28678,8 +28681,8 @@ function M.reader.new(writer, options)

parsers.note_opening = #(parsers.circumflex * parsers.shortcut_link)
* Cg(Cc("note_inline"), "link_type")
parsers.raw_note_opening = #( parsers.lbracket

parsers.raw_note_opening = #( parsers.lbracket
* parsers.circumflex
* parsers.link_label_body
* parsers.rbracket)
@@ -30149,7 +30152,6 @@ end
% \end{markdown}
% \begin{macrocode}
references = {}
rawnotes = {}
local opt_string = {}
for k, _ in pairs(defaultOptions) do
local v = options[k]
@@ -31869,6 +31871,8 @@ M.extensions.notes = function(notes, inline_notes)
local parsers = self.parsers
local writer = self.writer

local rawnotes = parsers.rawnotes

if inline_notes then
local InlineNote
= parsers.circumflex
Loading