forked from docs/doc-exports
Compare commits
4 Commits
main
...
new_rds_co
Author | SHA1 | Date | |
---|---|---|---|
556316d858 | |||
cb7902cbe6 | |||
eed7f61f02 | |||
5239181c81 |
@ -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