diff options
| author | Shulhan <ms@kilabit.info> | 2025-04-18 15:24:10 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2025-04-18 15:24:10 +0700 |
| commit | f25296bef9bb02f3be87e61c54703e26b7814096 (patch) | |
| tree | 50693da53586aba7efe84af245f26fbe789725ce /document_parser.go | |
| parent | 89d1a301ea4d42b73d7af3c982ede59e1f868260 (diff) | |
| download | asciidoctor-go-f25296bef9bb02f3be87e61c54703e26b7814096.tar.xz | |
all: support include directive inside block code
Example of block code with include directive,
----
...
include::file[]
...
----
Diffstat (limited to 'document_parser.go')
| -rw-r--r-- | document_parser.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/document_parser.go b/document_parser.go index ca167e6..8de91cc 100644 --- a/document_parser.go +++ b/document_parser.go @@ -552,7 +552,7 @@ func (docp *documentParser) parseBlock(parent *element, term int) { el.kind = docp.kind el.addRole(classNameListingBlock) line = docp.consumeLinesUntil(el, docp.kind, nil) - el.raw = applySubstitutions(docp.doc, el.raw) + el.raw = preprocessBlockCode(docp.doc, el.raw) parent.addChild(el) el = &element{} continue @@ -872,7 +872,7 @@ func (docp *documentParser) parseListBlock() (el *element, line []byte) { kind: docp.kind, } docp.consumeLinesUntil(el, docp.kind, nil) - el.raw = applySubstitutions(docp.doc, el.raw) + el.raw = preprocessBlockCode(docp.doc, el.raw) line = nil break } |
