diff --git a/org/inline.go b/org/inline.go index e2587d0..f2e91a6 100644 --- a/org/inline.go +++ b/org/inline.go @@ -73,7 +73,7 @@ var timestampRegexp = regexp.MustCompile(`^<(\d{4}-\d{2}-\d{2})( [A-Za-z]+)?( \d var footnoteRegexp = regexp.MustCompile(`^\[fn:([\w-]*?)(:(.*?))?\]`) var statisticsTokenRegexp = regexp.MustCompile(`^\[(\d+/\d+|\d+%)\]`) var latexFragmentRegexp = regexp.MustCompile(`(?s)^\\begin{(\w+)}(.*)\\end{(\w+)}`) -var inlineBlockRegexp = regexp.MustCompile(`src_(\w+)(\[(.*)\])?{(.*)}`) +var inlineBlockRegexp = regexp.MustCompile(`src_(\w+)(\[([^\]]*)\])?{([^}]*)}`) var inlineExportBlockRegexp = regexp.MustCompile(`@@(\w+):(.*?)@@`) var macroRegexp = regexp.MustCompile(`{{{(.*)\((.*)\)}}}`) diff --git a/org/testdata/inline.html b/org/testdata/inline.html index 67f5495..daec3fa 100644 --- a/org/testdata/inline.html +++ b/org/testdata/inline.html @@ -18,6 +18,12 @@ also hard line breaks not followed by a newline get ignored, see \\ <h1>hello</h1> + and this
+
+
+world
+
+
  • inline export blocks

    hello

  • multiline emphasis is diff --git a/org/testdata/inline.org b/org/testdata/inline.org index 7f8b31d..cc0c845 100644 --- a/org/testdata/inline.org +++ b/org/testdata/inline.org @@ -11,7 +11,7 @@ - links with slashes do not become /emphasis/: [[https://somelinkshouldntrenderaccidentalemphasis.com]]/ /emphasis/ - _underlined_ *bold* =verbatim= ~code~ +strikethrough+ - *bold string with an *asterisk inside* -- inline source blocks like src_html[:eval no]{

    hello

    } +- inline source blocks like src_html[:eval no]{

    hello

    } and this src_schema[:eval no]{world} - inline export blocks @@html:

    hello

    @@ - =multiline emphasis is supported - and respects MaxEmphasisNewLines (default: 1)= diff --git a/org/testdata/inline.pretty_org b/org/testdata/inline.pretty_org index ab77e41..87238cc 100644 --- a/org/testdata/inline.pretty_org +++ b/org/testdata/inline.pretty_org @@ -11,7 +11,7 @@ - links with slashes do not become /emphasis/: [[https://somelinkshouldntrenderaccidentalemphasis.com]]/ /emphasis/ - _underlined_ *bold* =verbatim= ~code~ +strikethrough+ - *bold string with an *asterisk inside* -- inline source blocks like src_html[:eval no]{

    hello

    } +- inline source blocks like src_html[:eval no]{

    hello

    } and this src_schema[:eval no]{world} - inline export blocks @@html:

    hello

    @@ - =multiline emphasis is supported - and respects MaxEmphasisNewLines (default: 1)=