[
https://issues.apache.org/jira/browse/RAT-517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18145909#comment-18145909
]
Philipp Ottlinger commented on RAT-517:
---------------------------------------
[~snazy] ASCIIDoc seems to be different:
{{= Mein Dokumenttitel
:author: Max Mustermann
:email: [email protected]
:revdate: 2026-11-16
:revnumber: 1.0
:description: Eine Beschreibung des Dokuments
:doctype: article
:lang: de
:toc: left
:toclevels: 3
:sectnums:
:icons: font
== Einleitung
Hier beginnt der eigentliche Inhalt des Dokuments.
}}
so a useful way to treat that is to insert the license header as a comment
right after the last line with double-colon-values?
The license header would be inserted with suffix line {{{}'////{}}}' and a
separate line after the license with another {{{}'////{}}}', right?
> Markdown/Asciidoc front matter handling when adding license headers
> -------------------------------------------------------------------
>
> Key: RAT-517
> URL: https://issues.apache.org/jira/browse/RAT-517
> Project: Apache RAT
> Issue Type: Improvement
> Components: core engine
> Reporter: Robert Stupp
> Assignee: Philipp Ottlinger
> Priority: Major
> Fix For: 0.19
>
>
> [Markdown files are mapped to the SGML
> family|https://github.com/apache/creadur-rat/blob/b3b4d5c5223acab5528f552f84e195e0b766cc0e/apache-rat-core/src/main/java/org/apache/rat/annotation/AbstractLicenseAppender.java#L127],
> which can break rendering of these files, if those have a "front matter".
> Example of a Markdown front matter with a license header (same syntax for
> ASCIIdoc):
> {code:java}
> ---
> #
> # Licensed to the Apache Software Foundation (ASF) under one
> # or more contributor license agreements. See the NOTICE file
> # distributed with this work for additional information
> # regarding copyright ownership. The ASF licenses this file
> # to you under the Apache License, Version 2.0 (the
> # "License"); you may not use this file except in compliance
> # with the License. You may obtain a copy of the License at
> #
> # http://www.apache.org/licenses/LICENSE-2.0
> #
> # Unless required by applicable law or agreed to in writing,
> # software distributed under the License is distributed on an
> # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> # KIND, either express or implied. See the License for the
> # specific language governing permissions and limitations
> # under the License.
> #
> linkTitle: Community Guidelines
> type: docs
> weight: 500
> ---
> {code}
> Adding an SGML-style license header before the front matter breaks rendering
> for example in Hugo. This one breaks, because the front matter is not at the
> front ;)
> {code}
> <!--
> License...
> -->
> ---
> linkTitle: Community Guidelines
> type: docs
> weight: 500
> ---
> {code}
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)