Files
commonmark-java/commonmark-java.spec
Fridrich Strba 5445514ed4 Accepting request 1237959 from home:urbic:branches:Java:packages
- Update to v0.24.0
  * Added
    + SourceSpan on nodes now have a getInputIndex to get the index
      within the original input string (in addition to the existing
      line/column indexes). This is useful when looking up the
      input source: It can now be done using substring instead of
      having to split the input into lines first (#348)
    + Configurable line break rendering for TextContentRenderer via
      lineBreakRendering on the builder; e.g.
      LineBreakRendering.SEPARATE_BLOCKS will render an empty line
      between blocks (#344)
  * Changed
    + Adopted small changes from OpenJDK vendoring to make updates
      easier for them (#343)
  * Fixed
    + Enable overriding of built-in node rendering for
      TextContentRenderer (#346)
- Update to v0.23.0
  * Added
    + New extension for footnotes!
      = Syntax:
        Main text[^1]
        [^1]: Additional text in a footnote
      = Inline footnotes like ^[inline footnote] are also supported
        when enabled via an option in FootnotesExtension.Builder
      = Use class FootnotesExtension in artifact
        commonmark-ext-footnotes (#332)
    + New option omitSingleParagraphP in HtmlRenderer.Builder for
      not using <p> tags for when a document only has one paragraph
      (#150)
    + Support for custom link processing during inline parsing
      (e.g. [foo]), see Parser.Builder#linkProcessor
    + Support for extending inline parsing with custom inline
      content parsers. See
      Parser.Builder#customInlineContentParserFactory. This allows
      users/extensions to hook into inline parsing on a deeper
      level than before (e.g. with delimiter processors). It can be
      used to add support for math/latex formulas or other inline
      syntax. (#321)
  * Changed
    + The default DefaultUrlSanitizer now also allows data as a
      protocol. Use the constructor with a list to customize this.
      (#329)
    + LinkReferenceDefinition now extends Block (it was extending
      Node directly before)
    + MarkdownRenderer: Don't escape = text if it's the first node
      in a block (#335)
  * Fixed
    + Fix parsing of link reference definitions with incorrect
      title syntax (followed by characters other than space/tab).
      In that case, the title was set to the partially-parsed title
      and the source spans were wrong. (#315)
    + Fix source spans of blocks with lazy continuation lines
      (#337)
    + MarkdownRenderer: Preserve thematic break literals (#331)

OBS-URL: https://build.opensuse.org/request/show/1237959
OBS-URL: https://build.opensuse.org/package/show/Java:packages/commonmark-java?expand=0&rev=6
2025-01-15 12:15:41 +00:00

80 lines
2.7 KiB
RPMSpec

#
# spec file
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global project_name commonmark
Name: %{project_name}-java
Version: 0.24.0
Release: 0
Summary: Java library for parsing and rendering CommonMark (Markdown)
License: BSD-2-Clause
Group: Development/Libraries/Java
URL: https://github.com/%{project_name}/%{name}
Source: %{url}/archive/refs/tags/%{project_name}-parent-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: java-devel >= 1.8
BuildRequires: maven-local
BuildRequires: mvn(org.nibor.autolink:autolink)
BuildArch: noarch
%description
Java library for parsing and rendering Markdown text according to the
CommonMark specification (and some extensions).
Provides classes for parsing input to an abstract syntax tree of nodes (AST),
visiting and manipulating nodes, and rendering to HTML. It started out as a
port of commonmark.js, but has since evolved into a full library with a nice
API and the following features:
Small (core has no dependencies, extensions in separate artifacts)
Fast (10—20 times faster than pegdown, see benchmarks in repo)
Flexible (manipulate the AST after parsing, customize HTML rendering)
Extensible (tables, strikethrough, autolinking and more, see below)
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description javadoc
API documentation for %{name}.
%prep
%autosetup -n %{name}-%{project_name}-parent-%{version}
%pom_remove_plugin -r org.sonatype.plugins:nexus-staging-maven-plugin
%pom_remove_plugin -r :maven-javadoc-plugin
%{mvn_file} ':{*}' %{project_name}/@1
%build
%{mvn_build} -f -- \
-Dproject.build.outputTimestamp=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ) \
-Dsource=8
%install
%mvn_install
mv %{buildroot}%{_javadocdir}/%{name} %{buildroot}%{_javadocdir}/%{project_name}
%fdupes %{buildroot}%{_javadocdir}/%{project_name}
%files -f .mfiles
%license LICENSE.txt
%doc {README,CHANGELOG,CONTRIBUTING}.md
%files javadoc
%license LICENSE.txt
%{_javadocdir}
%changelog