forked from jgm/lunamark
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add a mechanism for extending the Markdown reader and writer #143
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Witiko
added
lua
Related to the Lua interface and implementation
technical debt
Related to code smells and refactoring
labels
Jun 26, 2022
Witiko
force-pushed
the
feature/add-extension-mechanism-for-markdown
branch
from
June 27, 2022 13:15
7dbc396
to
52d2fce
Compare
Witiko
force-pushed
the
feature/add-extension-mechanism-for-markdown
branch
from
June 27, 2022 13:21
52d2fce
to
71e0537
Compare
Witiko
force-pushed
the
feature/add-extension-mechanism-for-markdown
branch
from
June 27, 2022 14:12
677b26b
to
3b410c8
Compare
Witiko
force-pushed
the
feature/add-extension-mechanism-for-markdown
branch
from
June 27, 2022 14:17
3b410c8
to
201cd7b
Compare
Witiko
force-pushed
the
feature/add-extension-mechanism-for-markdown
branch
7 times, most recently
from
June 27, 2022 17:20
49c111b
to
33fad22
Compare
Witiko
force-pushed
the
feature/add-extension-mechanism-for-markdown
branch
4 times, most recently
from
June 27, 2022 18:19
8b6bddc
to
375e3a4
Compare
Witiko
force-pushed
the
feature/add-extension-mechanism-for-markdown
branch
4 times, most recently
from
June 27, 2022 19:32
5f9c0f0
to
826588e
Compare
Witiko
force-pushed
the
feature/add-extension-mechanism-for-markdown
branch
from
June 27, 2022 19:44
826588e
to
4fb4dbe
Compare
Witiko
force-pushed
the
feature/add-extension-mechanism-for-markdown
branch
from
June 27, 2022 20:31
3d9360d
to
2709e63
Compare
Witiko
force-pushed
the
feature/add-extension-mechanism-for-markdown
branch
2 times, most recently
from
June 27, 2022 21:45
52f4961
to
3d852e4
Compare
Witiko
force-pushed
the
feature/add-extension-mechanism-for-markdown
branch
from
June 27, 2022 22:00
ff05e28
to
794d6ba
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
lua
Related to the Lua interface and implementation
technical debt
Related to code smells and refactoring
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #138.
Tasks
reader
for extension:parsers
upvalue andlarsers
local toreader->parsers
.syntax
local toreader->syntax
.writer
local toreader->writer
.parse_*(...)
locals toreader->parser_functions.parse_*(...)
.extensions.table(captions)
function.writer
toextensions.table.extend_writer(writer)
.reader
toextensions.table.extend_reader(reader)
.reader->apply_extension(extension)
method that will callextensions.table.extend_reader(self)
andextensions.table.extend_writer(self.writer)
.new(options)
, react tooptions.pipeTables
andoptions.tableCaptions
by callingreader->apply_extension(...)
.fencedCode
andblankBeforeCodeFence
.citations
andcitationNbsps
.contentBlocks
andcontentBlocksLanguageMap
.definitionLists
.jekyllData
andexpectJekyllData
.footnotes
andinlineFootnotes
.headerAttributes
.The proposed changes will reduce the code complexity of the Lua parser and perhaps also make it possible for external code to extend Markdown, although such use would be still highly unstable due to the lack of encapsulation in the proposed implementation.