Merge branch 'asciidoc_inter_document_cross_references' into 'master'
Set Asciidoctor outfilesuffix to default .adoc Closes #43192 and #17602 See merge request gitlab-org/gitlab-ce!17125
This commit is contained in:
commit
89854139a4
3 changed files with 15 additions and 1 deletions
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Asciidoc now support inter-document cross references between files in repository
|
||||
merge_request: 17125
|
||||
author: Turo Soisenniemi
|
||||
type: changed
|
|
@ -8,7 +8,8 @@ module Gitlab
|
|||
module Asciidoc
|
||||
DEFAULT_ADOC_ATTRS = [
|
||||
'showtitle', 'idprefix=user-content-', 'idseparator=-', 'env=gitlab',
|
||||
'env-gitlab', 'source-highlighter=html-pipeline', 'icons=font'
|
||||
'env-gitlab', 'source-highlighter=html-pipeline', 'icons=font',
|
||||
'outfilesuffix=.adoc'
|
||||
].freeze
|
||||
|
||||
# Public: Converts the provided Asciidoc markup into HTML.
|
||||
|
|
|
@ -95,6 +95,14 @@ module Gitlab
|
|||
expect(render(input, context)).to include('<p><code data-math-style="inline" class="code math js-render-math">2+2</code> is 4</p>')
|
||||
end
|
||||
end
|
||||
|
||||
context 'outfilesuffix' do
|
||||
it 'defaults to adoc' do
|
||||
output = render("Inter-document reference <<README.adoc#>>", context)
|
||||
|
||||
expect(output).to include("a href=\"README.adoc\"")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def render(*args)
|
||||
|
|
Loading…
Reference in a new issue