diff options
author | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2023-03-13 16:04:19 +0100 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@libreoffice.org> | 2023-03-16 15:18:10 +0000 |
commit | 77cb682cd1b004e7247560e60f603a4bb0565b8d (patch) | |
tree | 5ff7d8bf5fcc8f9fe162b8ed05ca7eeaf21022ba /source/text/shared/07 | |
parent | 00567a452bb1e270dd2438dcc865359edba56c19 (diff) |
convert plain paragraphs with role="heading" → h<level>
i.e. without child elements and also drop the language that was changed
to implied in the dtd previously/defaults to en-US unless specified.
This change doesn't affect translations, only the content of the
paragraph/headings is extracted.
done with:
perl -CSD -pi -e 'BEGIN {$base = qr/role="heading"|level="(?<level>\d+)"|(?<id>id="[^"]+")/;} s#<paragraph(((\s+($base)){3})|(\s+($base|xml-lang="en-US")){4})>(?<body>[^<]+)</paragraph>#<h$+{level} $+{id}>$+{body}</h$+{level}>#g'
(all permutations re order of attributes, and xml-lang="en-US" being
optional / implied)
Change-Id: I365a2bb983a3969af9390753fce7b7f3597c7b8b
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/148795
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'source/text/shared/07')
-rw-r--r-- | source/text/shared/07/09000000.xhp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/text/shared/07/09000000.xhp b/source/text/shared/07/09000000.xhp index 1755633441..0d49e5c21d 100644 --- a/source/text/shared/07/09000000.xhp +++ b/source/text/shared/07/09000000.xhp @@ -33,7 +33,7 @@ <paragraph role="paragraph" id="par_id3146946" xml-lang="en-US">To create a new web page for the Internet, open a new <emph>HTML Document</emph> by choosing <item type="menuitem">File - New</item>.</paragraph> </section> <paragraph role="paragraph" id="par_id3143284" xml-lang="en-US">A tool for creating new web pages is the Web Layout mode, which you enable with <item type="menuitem">View - Web</item>.</paragraph> -<paragraph role="heading" id="hd_id3147285" xml-lang="en-US" level="2">Creating a New Web Page</paragraph> +<h2 id="hd_id3147285">Creating a New Web Page</h2> <list type="unordered"> <listitem> <paragraph role="listitem" id="par_id3150808" xml-lang="en-US">Switch to the web layout mode by choosing <item type="menuitem">View - Web</item> or by opening a new HTML document.</paragraph> |