forked from docs/doc-exports
adding rds fix for /* ... */ match which should also conver mrs previous
Reviewed-by: gtema <artem.goncharov@gmail.com> Co-authored-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-committed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
This commit is contained in:
parent
f15f2de664
commit
70c0715827
@ -403,7 +403,8 @@ class OTCDocConvertor:
|
||||
# MRS UMN contain: /:*?"<>|\\;&,'`!{}[]$%+
|
||||
r"\s([^a-zA-Z0-9\s]{8,})",
|
||||
# MRS operation guide contain: /*+ MAPJOIN(join_table) \*/
|
||||
r"\s(/\*.*\*/)",
|
||||
# RDS UMN contain: /*FORCE_MASTER*/
|
||||
r"(/\*.{5,}\*/)",
|
||||
# BMS API contain sequence in a dedicated paragraph
|
||||
r"^([^a-zA-Z0-9\s]{10,})$",
|
||||
# OBS special chars - "\$" "\\" etc
|
||||
|
@ -191,3 +191,31 @@ class TestConvertor(TestCase):
|
||||
str(res.find('p')),
|
||||
expected.strip(),
|
||||
)
|
||||
|
||||
def test_streamline_html_escape_14(self):
|
||||
test_data= """
|
||||
<li id="mrs_01_0979__en-us_topic_0000001173470738_en-us_topic_0116526932_li53294272">Use /*+ MAPJOIN(join_table) */.</li>
|
||||
""" # noqa
|
||||
expected = """
|
||||
<li>Use <code>/*+ MAPJOIN(join_table) */</code>.</li>
|
||||
""" # noqa
|
||||
soup = bs4.BeautifulSoup(test_data, 'lxml')
|
||||
res = self.convertor.streamline_html(soup, "dummy")
|
||||
self.assertEqual(
|
||||
str(res.find('li')),
|
||||
expected.strip(),
|
||||
)
|
||||
|
||||
def test_streamline_html_escape_15(self):
|
||||
test_data= """
|
||||
<p id="rds_11_0020__en-us_topic_0200110324_p133410225015">/*FORCE_MASTER*/: A SQL statement is routed to the primary DB instance.</p>
|
||||
""" # noqa
|
||||
expected = """
|
||||
<p id="rds_11_0020__en-us_topic_0200110324_p133410225015"><code>/*FORCE_MASTER*/</code>: A SQL statement is routed to the primary DB instance.</p>
|
||||
""" # noqa
|
||||
soup = bs4.BeautifulSoup(test_data, 'lxml')
|
||||
res = self.convertor.streamline_html(soup, "dummy")
|
||||
self.assertEqual(
|
||||
str(res.find('p')),
|
||||
expected.strip(),
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user