lostenderman / markdown

:notebook_with_decorative_cover: A package for converting and rendering markdown documents in TeX
http://ctan.org/pkg/markdown
LaTeX Project Public License v1.3c
1 stars 0 forks source link

Code spans #128

Closed lostenderman closed 1 year ago

lostenderman commented 1 year ago

Closes #15. Closes #16. Closes #18.

Witiko commented 1 year ago

Ok, LGTM.

On Tue, Mar 14, 2023 at 03:31:17AM -0700, LostEnderman wrote:

@lostenderman commented on this pull request.

@@ -23396,7 +23405,7 @@ function M.reader.new(writer, options) parsers.Str = (parsers.normalchar * (parsers.normalchar + parsers.at)^0) / writer.string

  • parsers.Symbol = (V("SpecialChar") - parsers.tightblocksep)
  • parsers.Symbol = (parsers.backtick^1 + V("SpecialChar") - parsers.tightblocksep)

Simply adding the backtick as

self.add_special_character("`")

and changing the parsers.Symbol back to

parsers.Symbol   = (V("SpecialChar") - parsers.tightblocksep)
                   / writer.string

does not quite work. If a backtick is found, all following backticks should also not create a code span.


Example:

``a`

should be parsed as

``a`

and not as

`\markdownRendererCodeSpan{a}

-- Reply to this email directly or view it on GitHub: https://github.com/lostenderman/markdown/pull/128#discussion_r1135331425 You are receiving this because you commented.