@ecency/render-helper 2.2.31 → 2.2.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,13 +4,13 @@ import { markdown2Html } from './markdown-2-html'
4
4
  const fs = require('fs')
5
5
  const path = require('path')
6
6
  const SNAPSHOT_JSON = {
7
- "markdown_2_html_test_files_1_should_catch_images_in_table": "<p><span>Congratulations <a class=\"markdown-author-link\" data-author=\"dunsky\">@dunsky</a>! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :</span></p>\n<table><tr><td><span><img class=\"markdown-img-link\" src=\"https://images.ecency.com/p/9RTqgyyu8sX2kxvHt3ueNhDJEActwvqfV9wXt7pGKpjnWxBVz6r6Lv5n7t2RYBogkr5EjvnLjk.png?format=match&amp;mode=fit\" /></span></td><td>You made more than 6000 upvotes. Your next target is to reach 7000 upvotes.</td></tr>\n<tr><td><span><img class=\"markdown-img-link\" src=\"https://images.ecency.com/p/9RTqgyyu8sX2kxvHt3ueNhDJEActwvqfV9wXt7pGKpjnVKjKxTD5Xwi6jJqBW9PAmtMWvTCvPF.png?format=match&amp;mode=fit\" /></span></td><td>You published more than 250 posts. Your next target is to reach 300 posts.</td></tr>\n</table>\n<p><sub><em><a class=\"markdown-external-link\" data-href=\"https://steemitboard.com/@dunsky\">Click here to view your Board of Honor</a></em></sub><br />\n<sub><em>If you no longer want to receive notifications, reply to this comment with the word</em> <code>STOP</code></sub></p>\n<p>To support your work, I also upvoted your post!</p>\n<blockquote>\n<p>Support <a class=\"markdown-external-link\" data-href=\"https://steemit.com/@steemitboard\">SteemitBoard's project</a>! <strong><a class=\"markdown-external-link\" data-href=\"https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&amp;approve=1\">Vote for its witness</a></strong> and <strong>get one more award</strong>!</p>\n</blockquote>",
8
- "markdown_2_html_test_files_3_should_replace_busy_links_properly": "<p><img src=\"https://.esteem.app/0x0/https://ipfs.busy.org/ipfs/QmPziJCkx8w62UZCz1TNxAMsgf1uTnPZdVKAYjLBWvMzeD\" alt=\"image.png\" /></p>\n<p><a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-1-2\">Part 1 - 2</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-3\">Part 3</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-4\">Part 4</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-5\">Part 5</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-6\">Part 6</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-7\">Part 7</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-8\">Part 8</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-9\">Part 9</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-10\">Part 10</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-11\">Part 11</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-12\">Part 12</a></p>\n<p><strong>Part 13</strong></p>\n<p>Members of the Yerşehir caravan have surrendered their weapons to imperial soldiers at the entrance of Istanbul by the agreement provided earlier. The imperial soldiers arrested them immediately after the surrender of the weapons, and they entered the city with their hands chained.</p>\n<p>“The Yerşehir administration will ask you the account of this disrespect,” said Tamra to the proud Commander Timor on the pony. Tamra was angry because an ordinary soldier pushed her.</p>\n<p>\"You should be thankful we didn't strip you naked and had you wandering the streets of the city,\" said Commander Timor.</p>\n<p>Doma turned to the commander and said, “That's not how we dealt with you. Still, I assume you're doing your duty. I ask you to inform your superiors as soon as possible.”</p>\n<p>”You may be executed for armed entry into the Imperial lands,\" said the commander.</p>\n<p>“You like to dramatize things,” Akman said. Although Commander Timor was angry with Akman's happy face, he chose to keep the sarcastic look on his face.</p>\n<p>When he was taken to the dungeon, Akman was watching the buildings on the road, the squares adorned with sculptures, statues, and facades reflecting the beauty of East Roman stone craftsmanship.</p>\n<p>After passing the Hippodrome, which is one of the rare works of the ancient world, they entered a narrow tunnel and went down a ladder descending by turning. The soldiers locked them in a large gallery and returned. The water was dripping from the high ceiling of the dungeon, and the air they breathed was quite damp. Akman saw two rats with the size of cats running to their holes, terrified by the sound of footsteps.</p>\n<p>”I don't think they're gonna keep us here for long,\" Akman said.</p>\n<p>Akman was wrong; they told stories to each other in the first few days while there was no authority to call and ask for them. One of the dungeon guards came once a day and left a cup of water and a disgusting wheat porridge in the cell. The amount of oatmeal brought by the guard was so small that it was even possible for them to starve if the situation went on like this.</p>\n<p>Akman was cheerful as if he was at the banquet table, not at the dungeon. His joy was so bizarre that the team members began to think he was out of his mind. As the days passed, he was weakened by malnutrition; his clothes were stained, and his face was blackened. Still, he didn't lose anything from his joy. When asked how it can be so enjoyable, he said, “peace and light are within us. Just let's call and find out.\"</p>\n<p>Days later, an officer finally appeared at the door of the dungeon. Now, even the sparkle in the eyes of Akman has been lost, and Doma was unable to get up from where he was sleeping because of his illness. “The emperor will meet with the two representatives of your choice in two days,” said Chlorus, who brought plenty of food with him. Chlorus was handling his business with care. He brought water and ash to the cell to make sure they didn't smell bad, and he arranged a basin for their clothes. After washing, a barber would cut off their hair and beard. When they talk to the emperor, they should not extend the word and that they should give satisfying answers to the questions asked.</p>\n<p>Akman and Doma were taken from prison by the guards to be brought to the emperor. They agreed to hold a reasonable discourse during the interview. They were ready to suffer the maltreatment for the well-being of their country. The Imperial Palace adjacent to the Hippodrome was quite magnificent. They couldn't retrieve their eyes from the mosaics on the floor, the tiles on the walls and the stained glass windows. They passed through the large gate of the palace and entered the inner courtyard, where they waited for a while and then came to the emperor's presence.</p>\n<p>Since Doma's disease has not passed yet, Akman was holding his arm. As a matter of fact, he hasn't been able to speak; he agreed to join the meeting to show The Emperor what a terrible treatment they had.</p>\n<p>As soon as Emperor Valens saw Doma, he noticed his discomfort and told the servants to bring him a chair to sit down.</p>\n<p>“You wanted to see me,” said the Emperor, sitting on a plain throne compared to the splendor of the palace.</p>\n<p>”In the name of my people, I share your sorrow,\" said Akman.</p>\n<p>The emperor looked at Akman with the eyes asking, \"what is it about?”</p>\n<p>“I think robots attack your stables,” Akman said. Doma, who saw the environment as blurry due to high fever, turned and looked at Akman with amazement.</p>\n<p>”Few people know that yet, \" said Emperor Valens. Akman heard the news from the two soldiers they encountered on the way to the dungeon; the soldiers thought others did not understand them because they were whispering. As the security of his country is concerned, Akman chose to transfer the incident to the emperor in a different manner.</p>\n<p>\"We came to Istanbul to warn you about this. When the imperial authorities said in the dungeon that we could finally come to your peace, I understood that the attack has occurred,” Akman said.</p>\n<p>“You speak our language very well,” said the emperor.</p>\n<p>“Master Doma is much better than me, I hoped he'd be able to talk, but I was wrong,\" Akman said.</p>\n<p>\"I give you my regards and my gratitude for showing us the grace of acceptance. Because of my illness, I beg forgiveness for the imperfections that I can handle,” Doma said.</p>\n<p>“I will ask without hesitation: what could we have done to draw the wrath of God upon us, and what should we do to be merciful to his forgiveness?”</p>\n<p>Akman did not tell the emperor that events had begun with Ordin rising to Earth. He didn't want him to think they were in charge of the activities. Moreover, there was no evidence that the attacks on the stables in Yerşehir and Istanbul were related to Ordin's action. It was more than three months ago, and it could have been a coincidence.</p>\n<p>“I do not think that what happened is related to any sin.”</p>\n<p>“Foreigners come to our city with magical weapons, and ten days later, such an attack is taking place. Is that a coincidence?”</p>\n<p>\"I suspect that your scientists have already studied our weapons and have partially solved their operational principles. I assure you, our weapons work in accordance with scientific rules. I don't know why we're being treated so hard in your country.”</p>\n<p>“Could it be because you closed your doors to our country with a unilateral decision you made two centuries ago? According to historical records, despite the insistence of our empire, we have not even been able to negotiate the matter.”</p>\n<p>“It was a great travesty that half of our people died because of the plague. But that's not a valid excuse. I think the decision we made on time was wrong. During the past, we have been deprived of the benefits that we can achieve mutually. Given that the tunnel system makes wars almost impossible, it is not reasonable for us to continue such a mistake,\" Akman said.</p>\n<p>“I haven't received a satisfactory answer to my questions yet?\" the emperor said, despite the tone of his voice, his eyes were warm to Akman.</p>\n<p>\"I have to admit I don't know the answer to your questions, even if it's embarrassing for a philosopher. We came to Istanbul to find the answer to this question together.”</p>\n<p>\"I want to learn the working principles and how to produce the weapons you bring with you. This is the only way we can initiate an equality-based relationship.”</p>\n<p>\"I am not authorized to make such a decision. But I don't think your offer will be rejected at a time when we need cooperation to defend our cities,\" Akman said.</p>\n<p>After the meeting with Emperor Valens, the Yerşehir delegation was removed from prison, their belongings were returned, and they were sent from Istanbul with a ceremony in accordance with diplomatic traditions.</p>\n<p>Image Source: pixabay.com</p>",
9
- "markdown_2_html_test_files_4_should_not_convert_markdown_links": "<p>lorem <a class=\"markdown-external-link\" data-href=\"https://images.ecency.com/0x0/https://d1vof77qrk4l5q.cloudfront.net/img/5752638e6965247789bc20cef34727263aaa41e1.png\">this error</a> ipsum</p>",
10
- "markdown_2_html_traversing_20_should_not_convert_markdown_links": "<p>lorem <a class=\"markdown-external-link\" data-href=\"https://images.ecency.com/0x0/https://d1vof77qrk4l5q.cloudfront.net/img/5752638e6965247789bc20cef34727263aaa41e1.png\">this error</a> ipsum</p>",
11
- "markdown_2_html_traversing_22_should_replace_busy_links_properly": "<p><img src=\"https://images.ecency.com/p/7ohP4GDMGPrUMp8dW6yuJTR9MKNu8P8DCXDU9qmmhgT2GEFsgcwp6r41v9wnLUULgcVqE59AhpBJjFXHVP6KTGZbAszsNTZrVUY3.png?format=match&amp;mode=fit\" alt=\"image.png\" /></p>\n<p><a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-1-2\">Part 1 - 2</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-3\">Part 3</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-4\">Part 4</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-5\">Part 5</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-6\">Part 6</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-7\">Part 7</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-8\">Part 8</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-9\">Part 9</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-10\">Part 10</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-11\">Part 11</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-12\">Part 12</a></p>\n<p><strong>Part 13</strong></p>\n<p>Members of the Yerşehir caravan have surrendered their weapons to imperial soldiers at the entrance of Istanbul by the agreement provided earlier. The imperial soldiers arrested them immediately after the surrender of the weapons, and they entered the city with their hands chained.</p>\n<p>“The Yerşehir administration will ask you the account of this disrespect,” said Tamra to the proud Commander Timor on the pony. Tamra was angry because an ordinary soldier pushed her.</p>\n<p>\"You should be thankful we didn't strip you naked and had you wandering the streets of the city,\" said Commander Timor.</p>\n<p>Doma turned to the commander and said, “That's not how we dealt with you. Still, I assume you're doing your duty. I ask you to inform your superiors as soon as possible.”</p>\n<p>”You may be executed for armed entry into the Imperial lands,\" said the commander.</p>\n<p>“You like to dramatize things,” Akman said. Although Commander Timor was angry with Akman's happy face, he chose to keep the sarcastic look on his face.</p>\n<p>When he was taken to the dungeon, Akman was watching the buildings on the road, the squares adorned with sculptures, statues, and facades reflecting the beauty of East Roman stone craftsmanship.</p>\n<p>After passing the Hippodrome, which is one of the rare works of the ancient world, they entered a narrow tunnel and went down a ladder descending by turning. The soldiers locked them in a large gallery and returned. The water was dripping from the high ceiling of the dungeon, and the air they breathed was quite damp. Akman saw two rats with the size of cats running to their holes, terrified by the sound of footsteps.</p>\n<p>”I don't think they're gonna keep us here for long,\" Akman said.</p>\n<p>Akman was wrong; they told stories to each other in the first few days while there was no authority to call and ask for them. One of the dungeon guards came once a day and left a cup of water and a disgusting wheat porridge in the cell. The amount of oatmeal brought by the guard was so small that it was even possible for them to starve if the situation went on like this.</p>\n<p>Akman was cheerful as if he was at the banquet table, not at the dungeon. His joy was so bizarre that the team members began to think he was out of his mind. As the days passed, he was weakened by malnutrition; his clothes were stained, and his face was blackened. Still, he didn't lose anything from his joy. When asked how it can be so enjoyable, he said, “peace and light are within us. Just let's call and find out.\"</p>\n<p>Days later, an officer finally appeared at the door of the dungeon. Now, even the sparkle in the eyes of Akman has been lost, and Doma was unable to get up from where he was sleeping because of his illness. “The emperor will meet with the two representatives of your choice in two days,” said Chlorus, who brought plenty of food with him. Chlorus was handling his business with care. He brought water and ash to the cell to make sure they didn't smell bad, and he arranged a basin for their clothes. After washing, a barber would cut off their hair and beard. When they talk to the emperor, they should not extend the word and that they should give satisfying answers to the questions asked.</p>\n<p>Akman and Doma were taken from prison by the guards to be brought to the emperor. They agreed to hold a reasonable discourse during the interview. They were ready to suffer the maltreatment for the well-being of their country. The Imperial Palace adjacent to the Hippodrome was quite magnificent. They couldn't retrieve their eyes from the mosaics on the floor, the tiles on the walls and the stained glass windows. They passed through the large gate of the palace and entered the inner courtyard, where they waited for a while and then came to the emperor's presence.</p>\n<p>Since Doma's disease has not passed yet, Akman was holding his arm. As a matter of fact, he hasn't been able to speak; he agreed to join the meeting to show The Emperor what a terrible treatment they had.</p>\n<p>As soon as Emperor Valens saw Doma, he noticed his discomfort and told the servants to bring him a chair to sit down.</p>\n<p>“You wanted to see me,” said the Emperor, sitting on a plain throne compared to the splendor of the palace.</p>\n<p>”In the name of my people, I share your sorrow,\" said Akman.</p>\n<p>The emperor looked at Akman with the eyes asking, \"what is it about?”</p>\n<p>“I think robots attack your stables,” Akman said. Doma, who saw the environment as blurry due to high fever, turned and looked at Akman with amazement.</p>\n<p>”Few people know that yet, \" said Emperor Valens. Akman heard the news from the two soldiers they encountered on the way to the dungeon; the soldiers thought others did not understand them because they were whispering. As the security of his country is concerned, Akman chose to transfer the incident to the emperor in a different manner.</p>\n<p>\"We came to Istanbul to warn you about this. When the imperial authorities said in the dungeon that we could finally come to your peace, I understood that the attack has occurred,” Akman said.</p>\n<p>“You speak our language very well,” said the emperor.</p>\n<p>“Master Doma is much better than me, I hoped he'd be able to talk, but I was wrong,\" Akman said.</p>\n<p>\"I give you my regards and my gratitude for showing us the grace of acceptance. Because of my illness, I beg forgiveness for the imperfections that I can handle,” Doma said.</p>\n<p>“I will ask without hesitation: what could we have done to draw the wrath of God upon us, and what should we do to be merciful to his forgiveness?”</p>\n<p>Akman did not tell the emperor that events had begun with Ordin rising to Earth. He didn't want him to think they were in charge of the activities. Moreover, there was no evidence that the attacks on the stables in Yerşehir and Istanbul were related to Ordin's action. It was more than three months ago, and it could have been a coincidence.</p>\n<p>“I do not think that what happened is related to any sin.”</p>\n<p>“Foreigners come to our city with magical weapons, and ten days later, such an attack is taking place. Is that a coincidence?”</p>\n<p>\"I suspect that your scientists have already studied our weapons and have partially solved their operational principles. I assure you, our weapons work in accordance with scientific rules. I don't know why we're being treated so hard in your country.”</p>\n<p>“Could it be because you closed your doors to our country with a unilateral decision you made two centuries ago? According to historical records, despite the insistence of our empire, we have not even been able to negotiate the matter.”</p>\n<p>“It was a great travesty that half of our people died because of the plague. But that's not a valid excuse. I think the decision we made on time was wrong. During the past, we have been deprived of the benefits that we can achieve mutually. Given that the tunnel system makes wars almost impossible, it is not reasonable for us to continue such a mistake,\" Akman said.</p>\n<p>“I haven't received a satisfactory answer to my questions yet?\" the emperor said, despite the tone of his voice, his eyes were warm to Akman.</p>\n<p>\"I have to admit I don't know the answer to your questions, even if it's embarrassing for a philosopher. We came to Istanbul to find the answer to this question together.”</p>\n<p>\"I want to learn the working principles and how to produce the weapons you bring with you. This is the only way we can initiate an equality-based relationship.”</p>\n<p>\"I am not authorized to make such a decision. But I don't think your offer will be rejected at a time when we need cooperation to defend our cities,\" Akman said.</p>\n<p>After the meeting with Emperor Valens, the Yerşehir delegation was removed from prison, their belongings were returned, and they were sent from Istanbul with a ceremony in accordance with diplomatic traditions.</p>\n<p>Image Source: pixabay.com</p>",
7
+ "markdown_2_html_test_files_1_should_catch_images_in_table": "<p dir=\"auto\"><span>Congratulations <a class=\"markdown-author-link\" data-author=\"dunsky\">@dunsky</a>! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :</span></p>\n<table><tr><td><span><img class=\"markdown-img-link\" src=\"https://images.ecency.com/p/9RTqgyyu8sX2kxvHt3ueNhDJEActwvqfV9wXt7pGKpjnWxBVz6r6Lv5n7t2RYBogkr5EjvnLjk.png?format=match&amp;mode=fit\" /></span></td><td>You made more than 6000 upvotes. Your next target is to reach 7000 upvotes.</td></tr>\n<tr><td><span><img class=\"markdown-img-link\" src=\"https://images.ecency.com/p/9RTqgyyu8sX2kxvHt3ueNhDJEActwvqfV9wXt7pGKpjnVKjKxTD5Xwi6jJqBW9PAmtMWvTCvPF.png?format=match&amp;mode=fit\" /></span></td><td>You published more than 250 posts. Your next target is to reach 300 posts.</td></tr>\n</table>\n<p dir=\"auto\"><sub><em><a class=\"markdown-external-link\" data-href=\"https://steemitboard.com/@dunsky\">Click here to view your Board of Honor</a></em></sub><br />\n<sub><em>If you no longer want to receive notifications, reply to this comment with the word</em> <code>STOP</code></sub></p>\n<p dir=\"auto\">To support your work, I also upvoted your post!</p>\n<blockquote>\n<p dir=\"auto\">Support <a class=\"markdown-external-link\" data-href=\"https://steemit.com/@steemitboard\">SteemitBoard's project</a>! <strong><a class=\"markdown-external-link\" data-href=\"https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&amp;approve=1\">Vote for its witness</a></strong> and <strong>get one more award</strong>!</p>\n</blockquote>",
8
+ "markdown_2_html_test_files_3_should_replace_busy_links_properly": "<p dir=\"auto\"><img src=\"https://.esteem.app/0x0/https://ipfs.busy.org/ipfs/QmPziJCkx8w62UZCz1TNxAMsgf1uTnPZdVKAYjLBWvMzeD\" alt=\"image.png\" /></p>\n<p dir=\"auto\"><a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-1-2\">Part 1 - 2</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-3\">Part 3</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-4\">Part 4</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-5\">Part 5</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-6\">Part 6</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-7\">Part 7</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-8\">Part 8</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-9\">Part 9</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-10\">Part 10</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-11\">Part 11</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-12\">Part 12</a></p>\n<p dir=\"auto\"><strong>Part 13</strong></p>\n<p dir=\"auto\">Members of the Yerşehir caravan have surrendered their weapons to imperial soldiers at the entrance of Istanbul by the agreement provided earlier. The imperial soldiers arrested them immediately after the surrender of the weapons, and they entered the city with their hands chained.</p>\n<p dir=\"auto\">“The Yerşehir administration will ask you the account of this disrespect,” said Tamra to the proud Commander Timor on the pony. Tamra was angry because an ordinary soldier pushed her.</p>\n<p dir=\"auto\">\"You should be thankful we didn't strip you naked and had you wandering the streets of the city,\" said Commander Timor.</p>\n<p dir=\"auto\">Doma turned to the commander and said, “That's not how we dealt with you. Still, I assume you're doing your duty. I ask you to inform your superiors as soon as possible.”</p>\n<p dir=\"auto\">”You may be executed for armed entry into the Imperial lands,\" said the commander.</p>\n<p dir=\"auto\">“You like to dramatize things,” Akman said. Although Commander Timor was angry with Akman's happy face, he chose to keep the sarcastic look on his face.</p>\n<p dir=\"auto\">When he was taken to the dungeon, Akman was watching the buildings on the road, the squares adorned with sculptures, statues, and facades reflecting the beauty of East Roman stone craftsmanship.</p>\n<p dir=\"auto\">After passing the Hippodrome, which is one of the rare works of the ancient world, they entered a narrow tunnel and went down a ladder descending by turning. The soldiers locked them in a large gallery and returned. The water was dripping from the high ceiling of the dungeon, and the air they breathed was quite damp. Akman saw two rats with the size of cats running to their holes, terrified by the sound of footsteps.</p>\n<p dir=\"auto\">”I don't think they're gonna keep us here for long,\" Akman said.</p>\n<p dir=\"auto\">Akman was wrong; they told stories to each other in the first few days while there was no authority to call and ask for them. One of the dungeon guards came once a day and left a cup of water and a disgusting wheat porridge in the cell. The amount of oatmeal brought by the guard was so small that it was even possible for them to starve if the situation went on like this.</p>\n<p dir=\"auto\">Akman was cheerful as if he was at the banquet table, not at the dungeon. His joy was so bizarre that the team members began to think he was out of his mind. As the days passed, he was weakened by malnutrition; his clothes were stained, and his face was blackened. Still, he didn't lose anything from his joy. When asked how it can be so enjoyable, he said, “peace and light are within us. Just let's call and find out.\"</p>\n<p dir=\"auto\">Days later, an officer finally appeared at the door of the dungeon. Now, even the sparkle in the eyes of Akman has been lost, and Doma was unable to get up from where he was sleeping because of his illness. “The emperor will meet with the two representatives of your choice in two days,” said Chlorus, who brought plenty of food with him. Chlorus was handling his business with care. He brought water and ash to the cell to make sure they didn't smell bad, and he arranged a basin for their clothes. After washing, a barber would cut off their hair and beard. When they talk to the emperor, they should not extend the word and that they should give satisfying answers to the questions asked.</p>\n<p dir=\"auto\">Akman and Doma were taken from prison by the guards to be brought to the emperor. They agreed to hold a reasonable discourse during the interview. They were ready to suffer the maltreatment for the well-being of their country. The Imperial Palace adjacent to the Hippodrome was quite magnificent. They couldn't retrieve their eyes from the mosaics on the floor, the tiles on the walls and the stained glass windows. They passed through the large gate of the palace and entered the inner courtyard, where they waited for a while and then came to the emperor's presence.</p>\n<p dir=\"auto\">Since Doma's disease has not passed yet, Akman was holding his arm. As a matter of fact, he hasn't been able to speak; he agreed to join the meeting to show The Emperor what a terrible treatment they had.</p>\n<p dir=\"auto\">As soon as Emperor Valens saw Doma, he noticed his discomfort and told the servants to bring him a chair to sit down.</p>\n<p dir=\"auto\">“You wanted to see me,” said the Emperor, sitting on a plain throne compared to the splendor of the palace.</p>\n<p dir=\"auto\">”In the name of my people, I share your sorrow,\" said Akman.</p>\n<p dir=\"auto\">The emperor looked at Akman with the eyes asking, \"what is it about?”</p>\n<p dir=\"auto\">“I think robots attack your stables,” Akman said. Doma, who saw the environment as blurry due to high fever, turned and looked at Akman with amazement.</p>\n<p dir=\"auto\">”Few people know that yet, \" said Emperor Valens. Akman heard the news from the two soldiers they encountered on the way to the dungeon; the soldiers thought others did not understand them because they were whispering. As the security of his country is concerned, Akman chose to transfer the incident to the emperor in a different manner.</p>\n<p dir=\"auto\">\"We came to Istanbul to warn you about this. When the imperial authorities said in the dungeon that we could finally come to your peace, I understood that the attack has occurred,” Akman said.</p>\n<p dir=\"auto\">“You speak our language very well,” said the emperor.</p>\n<p dir=\"auto\">“Master Doma is much better than me, I hoped he'd be able to talk, but I was wrong,\" Akman said.</p>\n<p dir=\"auto\">\"I give you my regards and my gratitude for showing us the grace of acceptance. Because of my illness, I beg forgiveness for the imperfections that I can handle,” Doma said.</p>\n<p dir=\"auto\">“I will ask without hesitation: what could we have done to draw the wrath of God upon us, and what should we do to be merciful to his forgiveness?”</p>\n<p dir=\"auto\">Akman did not tell the emperor that events had begun with Ordin rising to Earth. He didn't want him to think they were in charge of the activities. Moreover, there was no evidence that the attacks on the stables in Yerşehir and Istanbul were related to Ordin's action. It was more than three months ago, and it could have been a coincidence.</p>\n<p dir=\"auto\">“I do not think that what happened is related to any sin.”</p>\n<p dir=\"auto\">“Foreigners come to our city with magical weapons, and ten days later, such an attack is taking place. Is that a coincidence?”</p>\n<p dir=\"auto\">\"I suspect that your scientists have already studied our weapons and have partially solved their operational principles. I assure you, our weapons work in accordance with scientific rules. I don't know why we're being treated so hard in your country.”</p>\n<p dir=\"auto\">“Could it be because you closed your doors to our country with a unilateral decision you made two centuries ago? According to historical records, despite the insistence of our empire, we have not even been able to negotiate the matter.”</p>\n<p dir=\"auto\">“It was a great travesty that half of our people died because of the plague. But that's not a valid excuse. I think the decision we made on time was wrong. During the past, we have been deprived of the benefits that we can achieve mutually. Given that the tunnel system makes wars almost impossible, it is not reasonable for us to continue such a mistake,\" Akman said.</p>\n<p dir=\"auto\">“I haven't received a satisfactory answer to my questions yet?\" the emperor said, despite the tone of his voice, his eyes were warm to Akman.</p>\n<p dir=\"auto\">\"I have to admit I don't know the answer to your questions, even if it's embarrassing for a philosopher. We came to Istanbul to find the answer to this question together.”</p>\n<p dir=\"auto\">\"I want to learn the working principles and how to produce the weapons you bring with you. This is the only way we can initiate an equality-based relationship.”</p>\n<p dir=\"auto\">\"I am not authorized to make such a decision. But I don't think your offer will be rejected at a time when we need cooperation to defend our cities,\" Akman said.</p>\n<p dir=\"auto\">After the meeting with Emperor Valens, the Yerşehir delegation was removed from prison, their belongings were returned, and they were sent from Istanbul with a ceremony in accordance with diplomatic traditions.</p>\n<p dir=\"auto\">Image Source: pixabay.com</p>",
9
+ "markdown_2_html_test_files_4_should_not_convert_markdown_links": "<p dir=\"auto\">lorem <a class=\"markdown-external-link\" data-href=\"https://images.ecency.com/0x0/https://d1vof77qrk4l5q.cloudfront.net/img/5752638e6965247789bc20cef34727263aaa41e1.png\">this error</a> ipsum</p>",
10
+ "markdown_2_html_traversing_20_should_not_convert_markdown_links": "<p dir=\"auto\">lorem <a class=\"markdown-external-link\" data-href=\"https://images.ecency.com/0x0/https://d1vof77qrk4l5q.cloudfront.net/img/5752638e6965247789bc20cef34727263aaa41e1.png\">this error</a> ipsum</p>",
11
+ "markdown_2_html_traversing_22_should_replace_busy_links_properly": "<p dir=\"auto\"><img src=\"https://images.ecency.com/p/7ohP4GDMGPrUMp8dW6yuJTR9MKNu8P8DCXDU9qmmhgT2GEFsgcwp6r41v9wnLUULgcVqE59AhpBJjFXHVP6KTGZbAszsNTZrVUY3.png?format=match&amp;mode=fit\" alt=\"image.png\" /></p>\n<p dir=\"auto\"><a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-1-2\">Part 1 - 2</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-3\">Part 3</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-4\">Part 4</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-5\">Part 5</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-6\">Part 6</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-7\">Part 7</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-8\">Part 8</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-9\">Part 9</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-10\">Part 10</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-11\">Part 11</a><br />\n<a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"muratkbesiroglu\" data-permlink=\"sci-fi-novel-underground-city-part-12\">Part 12</a></p>\n<p dir=\"auto\"><strong>Part 13</strong></p>\n<p dir=\"auto\">Members of the Yerşehir caravan have surrendered their weapons to imperial soldiers at the entrance of Istanbul by the agreement provided earlier. The imperial soldiers arrested them immediately after the surrender of the weapons, and they entered the city with their hands chained.</p>\n<p dir=\"auto\">“The Yerşehir administration will ask you the account of this disrespect,” said Tamra to the proud Commander Timor on the pony. Tamra was angry because an ordinary soldier pushed her.</p>\n<p dir=\"auto\">\"You should be thankful we didn't strip you naked and had you wandering the streets of the city,\" said Commander Timor.</p>\n<p dir=\"auto\">Doma turned to the commander and said, “That's not how we dealt with you. Still, I assume you're doing your duty. I ask you to inform your superiors as soon as possible.”</p>\n<p dir=\"auto\">”You may be executed for armed entry into the Imperial lands,\" said the commander.</p>\n<p dir=\"auto\">“You like to dramatize things,” Akman said. Although Commander Timor was angry with Akman's happy face, he chose to keep the sarcastic look on his face.</p>\n<p dir=\"auto\">When he was taken to the dungeon, Akman was watching the buildings on the road, the squares adorned with sculptures, statues, and facades reflecting the beauty of East Roman stone craftsmanship.</p>\n<p dir=\"auto\">After passing the Hippodrome, which is one of the rare works of the ancient world, they entered a narrow tunnel and went down a ladder descending by turning. The soldiers locked them in a large gallery and returned. The water was dripping from the high ceiling of the dungeon, and the air they breathed was quite damp. Akman saw two rats with the size of cats running to their holes, terrified by the sound of footsteps.</p>\n<p dir=\"auto\">”I don't think they're gonna keep us here for long,\" Akman said.</p>\n<p dir=\"auto\">Akman was wrong; they told stories to each other in the first few days while there was no authority to call and ask for them. One of the dungeon guards came once a day and left a cup of water and a disgusting wheat porridge in the cell. The amount of oatmeal brought by the guard was so small that it was even possible for them to starve if the situation went on like this.</p>\n<p dir=\"auto\">Akman was cheerful as if he was at the banquet table, not at the dungeon. His joy was so bizarre that the team members began to think he was out of his mind. As the days passed, he was weakened by malnutrition; his clothes were stained, and his face was blackened. Still, he didn't lose anything from his joy. When asked how it can be so enjoyable, he said, “peace and light are within us. Just let's call and find out.\"</p>\n<p dir=\"auto\">Days later, an officer finally appeared at the door of the dungeon. Now, even the sparkle in the eyes of Akman has been lost, and Doma was unable to get up from where he was sleeping because of his illness. “The emperor will meet with the two representatives of your choice in two days,” said Chlorus, who brought plenty of food with him. Chlorus was handling his business with care. He brought water and ash to the cell to make sure they didn't smell bad, and he arranged a basin for their clothes. After washing, a barber would cut off their hair and beard. When they talk to the emperor, they should not extend the word and that they should give satisfying answers to the questions asked.</p>\n<p dir=\"auto\">Akman and Doma were taken from prison by the guards to be brought to the emperor. They agreed to hold a reasonable discourse during the interview. They were ready to suffer the maltreatment for the well-being of their country. The Imperial Palace adjacent to the Hippodrome was quite magnificent. They couldn't retrieve their eyes from the mosaics on the floor, the tiles on the walls and the stained glass windows. They passed through the large gate of the palace and entered the inner courtyard, where they waited for a while and then came to the emperor's presence.</p>\n<p dir=\"auto\">Since Doma's disease has not passed yet, Akman was holding his arm. As a matter of fact, he hasn't been able to speak; he agreed to join the meeting to show The Emperor what a terrible treatment they had.</p>\n<p dir=\"auto\">As soon as Emperor Valens saw Doma, he noticed his discomfort and told the servants to bring him a chair to sit down.</p>\n<p dir=\"auto\">“You wanted to see me,” said the Emperor, sitting on a plain throne compared to the splendor of the palace.</p>\n<p dir=\"auto\">”In the name of my people, I share your sorrow,\" said Akman.</p>\n<p dir=\"auto\">The emperor looked at Akman with the eyes asking, \"what is it about?”</p>\n<p dir=\"auto\">“I think robots attack your stables,” Akman said. Doma, who saw the environment as blurry due to high fever, turned and looked at Akman with amazement.</p>\n<p dir=\"auto\">”Few people know that yet, \" said Emperor Valens. Akman heard the news from the two soldiers they encountered on the way to the dungeon; the soldiers thought others did not understand them because they were whispering. As the security of his country is concerned, Akman chose to transfer the incident to the emperor in a different manner.</p>\n<p dir=\"auto\">\"We came to Istanbul to warn you about this. When the imperial authorities said in the dungeon that we could finally come to your peace, I understood that the attack has occurred,” Akman said.</p>\n<p dir=\"auto\">“You speak our language very well,” said the emperor.</p>\n<p dir=\"auto\">“Master Doma is much better than me, I hoped he'd be able to talk, but I was wrong,\" Akman said.</p>\n<p dir=\"auto\">\"I give you my regards and my gratitude for showing us the grace of acceptance. Because of my illness, I beg forgiveness for the imperfections that I can handle,” Doma said.</p>\n<p dir=\"auto\">“I will ask without hesitation: what could we have done to draw the wrath of God upon us, and what should we do to be merciful to his forgiveness?”</p>\n<p dir=\"auto\">Akman did not tell the emperor that events had begun with Ordin rising to Earth. He didn't want him to think they were in charge of the activities. Moreover, there was no evidence that the attacks on the stables in Yerşehir and Istanbul were related to Ordin's action. It was more than three months ago, and it could have been a coincidence.</p>\n<p dir=\"auto\">“I do not think that what happened is related to any sin.”</p>\n<p dir=\"auto\">“Foreigners come to our city with magical weapons, and ten days later, such an attack is taking place. Is that a coincidence?”</p>\n<p dir=\"auto\">\"I suspect that your scientists have already studied our weapons and have partially solved their operational principles. I assure you, our weapons work in accordance with scientific rules. I don't know why we're being treated so hard in your country.”</p>\n<p dir=\"auto\">“Could it be because you closed your doors to our country with a unilateral decision you made two centuries ago? According to historical records, despite the insistence of our empire, we have not even been able to negotiate the matter.”</p>\n<p dir=\"auto\">“It was a great travesty that half of our people died because of the plague. But that's not a valid excuse. I think the decision we made on time was wrong. During the past, we have been deprived of the benefits that we can achieve mutually. Given that the tunnel system makes wars almost impossible, it is not reasonable for us to continue such a mistake,\" Akman said.</p>\n<p dir=\"auto\">“I haven't received a satisfactory answer to my questions yet?\" the emperor said, despite the tone of his voice, his eyes were warm to Akman.</p>\n<p dir=\"auto\">\"I have to admit I don't know the answer to your questions, even if it's embarrassing for a philosopher. We came to Istanbul to find the answer to this question together.”</p>\n<p dir=\"auto\">\"I want to learn the working principles and how to produce the weapons you bring with you. This is the only way we can initiate an equality-based relationship.”</p>\n<p dir=\"auto\">\"I am not authorized to make such a decision. But I don't think your offer will be rejected at a time when we need cooperation to defend our cities,\" Akman said.</p>\n<p dir=\"auto\">After the meeting with Emperor Valens, the Yerşehir delegation was removed from prison, their belongings were returned, and they were sent from Istanbul with a ceremony in accordance with diplomatic traditions.</p>\n<p dir=\"auto\">Image Source: pixabay.com</p>",
12
12
  "markdown_2_html_traversing_54_should_highlight_code": "<pre><code><span class=\"ll-spc\"> </span><span class=\"ll-key\">def</span><span class=\"ll-spc\"> </span><span class=\"ll-nam\">factorial</span><span class=\"ll-pct\">(</span><span class=\"ll-nam\">n</span><span class=\"ll-pct\">)</span><span class=\"ll-pct\">:</span><span class=\"ll-spc\">\n </span><span class=\"ll-com\"># a comment</span><span class=\"ll-spc\">\n </span><span class=\"ll-key\">return</span><span class=\"ll-spc\"> </span><span class=\"ll-num\">1</span><span class=\"ll-spc\"> </span><span class=\"ll-key\">if</span><span class=\"ll-spc\"> </span><span class=\"ll-pct\">(</span><span class=\"ll-nam\">n</span><span class=\"ll-pct\">=</span><span class=\"ll-pct\">=</span><span class=\"ll-num\">1</span><span class=\"ll-spc\"> </span><span class=\"ll-key\">or</span><span class=\"ll-spc\"> </span><span class=\"ll-nam\">n</span><span class=\"ll-pct\">=</span><span class=\"ll-pct\">=</span><span class=\"ll-num\">0</span><span class=\"ll-pct\">)</span><span class=\"ll-spc\"> </span><span class=\"ll-key\">else</span><span class=\"ll-spc\"> </span><span class=\"ll-nam\">n</span><span class=\"ll-spc\"> </span><span class=\"ll-pct\">*</span><span class=\"ll-spc\"> </span><span class=\"ll-nam\">factorial</span><span class=\"ll-pct\">(</span><span class=\"ll-nam\">n</span><span class=\"ll-spc\"> </span><span class=\"ll-pct\">-</span><span class=\"ll-spc\"> </span><span class=\"ll-num\">1</span><span class=\"ll-pct\">)</span><span class=\"ll-spc\">\n </span><span class=\"ll-str\">``</span><span class=\"ll-unk\">`</span><span class=\"ll-spc\">\n</span></code></pre>",
13
- "markdown_2_html_webp_support_should_render_images_in_webp_format": "<p>lorem ipsum <img class=\"markdown-img-link\" src=\"https://images.ecency.com/p/2BCfkBRHmbhyg7yeHaumxJq2oMZjKUDK5rv2tmGQzQHxPvTmaiv6Ar.webp?format=webp&amp;mode=fit\" /> dolor sit amet</p>"
13
+ "markdown_2_html_webp_support_should_render_images_in_webp_format": "<p dir=\"auto\">lorem ipsum <img class=\"markdown-img-link\" src=\"https://images.ecency.com/p/2BCfkBRHmbhyg7yeHaumxJq2oMZjKUDK5rv2tmGQzQHxPvTmaiv6Ar.webp?format=webp&amp;mode=fit\" /> dolor sit amet</p>"
14
14
  }
15
15
 
16
16
  describe('Markdown2Html', () => {
@@ -22,7 +22,7 @@ describe('Markdown2Html', () => {
22
22
  last_update: '2019-05-10T09:15:21',
23
23
  body: 'https://img.esteem.ws/bbq3ob1idy.png'
24
24
  }
25
- const expected = '<p><img class="markdown-img-link" src="https://images.ecency.com/p/o1AJ9qDyyJNSpZWhUgGYc3MngFqoAMwgbeMkkd8SVxyfRVjiN.png?format=match&amp;mode=fit" /></p>'
25
+ const expected = '<p dir=\"auto\"><img class="markdown-img-link" src="https://images.ecency.com/p/o1AJ9qDyyJNSpZWhUgGYc3MngFqoAMwgbeMkkd8SVxyfRVjiN.png?format=match&amp;mode=fit" /></p>'
26
26
 
27
27
  expect(markdown2Html(input)).toBe(expected)
28
28
  })
@@ -34,7 +34,7 @@ describe('Markdown2Html', () => {
34
34
  last_update: '2019-05-10T09:15:21',
35
35
  body: '<a href=\'https://steemit.com/esteem/@esteemapp/esteem-monthly-guest-curation-program-4\'>click here</a>'
36
36
  }
37
- const expected = '<p><a class="markdown-external-link" data-href="https://steemit.com/esteem/@esteemapp/esteem-monthly-guest-curation-program-4">click here</a></p>'
37
+ const expected = '<p dir=\"auto\"><a class="markdown-external-link" data-href="https://steemit.com/esteem/@esteemapp/esteem-monthly-guest-curation-program-4">click here</a></p>'
38
38
 
39
39
  expect(markdown2Html(input)).toBe(expected)
40
40
  })
@@ -46,7 +46,7 @@ describe('Markdown2Html', () => {
46
46
  last_update: '2019-05-10T09:15:21',
47
47
  body: '<a href=\'/esteem/@esteemapp/esteem-monthly-guest-curation-program-4\'>click here</a>'
48
48
  }
49
- const expected = '<p><a class="markdown-post-link" data-tag="esteem" data-author="esteemapp" data-permlink="esteem-monthly-guest-curation-program-4">click here</a></p>'
49
+ const expected = '<p dir=\"auto\"><a class="markdown-post-link" data-tag="esteem" data-author="esteemapp" data-permlink="esteem-monthly-guest-curation-program-4">click here</a></p>'
50
50
 
51
51
  expect(markdown2Html(input)).toBe(expected)
52
52
  })
@@ -58,7 +58,7 @@ describe('Markdown2Html', () => {
58
58
  last_update: '2019-05-10T09:15:21',
59
59
  body: '[click here](/esteem/@esteemapp/esteem-monthly-guest-curation-program-4)'
60
60
  }
61
- const expected = '<p><a class="markdown-post-link" data-tag="esteem" data-author="esteemapp" data-permlink="esteem-monthly-guest-curation-program-4">click here</a></p>'
61
+ const expected = '<p dir=\"auto\"><a class="markdown-post-link" data-tag="esteem" data-author="esteemapp" data-permlink="esteem-monthly-guest-curation-program-4">click here</a></p>'
62
62
 
63
63
  expect(markdown2Html(input)).toBe(expected)
64
64
  })
@@ -70,7 +70,7 @@ describe('Markdown2Html', () => {
70
70
  last_update: '2019-05-10T09:15:21',
71
71
  body: 'https://www.youtube.com/watch?v=qK3d1eoH-Qs'
72
72
  }
73
- const expected = '<p><a class="markdown-video-link markdown-video-link-youtube" data-embed-src="https://www.youtube.com/embed/qK3d1eoH-Qs?autoplay=1" data-youtube="qK3d1eoH-Qs"><img class="no-replace video-thumbnail" src="https://images.ecency.com/p/S5Eokt4BcQdk7EHeT1aYjzebg2hC7hkthT45eMZRVYW6mkGBWKemLWWzXbRhNG7Z3h1qjGS.png?format=match&amp;mode=fit" /><span class="markdown-video-play"></span></a></p>'
73
+ const expected = '<p dir=\"auto\"><a class="markdown-video-link markdown-video-link-youtube" data-embed-src="https://www.youtube.com/embed/qK3d1eoH-Qs?autoplay=1" data-youtube="qK3d1eoH-Qs"><img class="no-replace video-thumbnail" src="https://images.ecency.com/p/S5Eokt4BcQdk7EHeT1aYjzebg2hC7hkthT45eMZRVYW6mkGBWKemLWWzXbRhNG7Z3h1qjGS.png?format=match&amp;mode=fit" /><span class="markdown-video-play"></span></a></p>'
74
74
 
75
75
  expect(markdown2Html(input)).toBe(expected)
76
76
  })
@@ -82,7 +82,7 @@ describe('Markdown2Html', () => {
82
82
  last_update: '2019-05-10T09:15:21',
83
83
  body: 'https://vimeo.com/311983548'
84
84
  }
85
- const expected = '<p><a class="markdown-video-link markdown-video-link-vimeo"><iframe frameborder="0" allowfullscreen="true" src="https://player.vimeo.com/video/311983548"></iframe></a></p>'
85
+ const expected = '<p dir=\"auto\"><a class="markdown-video-link markdown-video-link-vimeo"><iframe frameborder="0" allowfullscreen="true" src="https://player.vimeo.com/video/311983548"></iframe></a></p>'
86
86
 
87
87
  expect(markdown2Html(input)).toBe(expected)
88
88
  })
@@ -94,7 +94,7 @@ describe('Markdown2Html', () => {
94
94
  last_update: '2019-05-10T09:15:21',
95
95
  body: '<a href="https://d.tube/#!/v/scottcbusiness/g04n2bbp" title="This link will take you away from steemit.com"><img src="https://images.ecency.com/640x0/https://ipfs.io/ipfs/QmPhb9HA1gASFiNAUPFqMdSidTAj17L5SSoV3zbXUx8M7t"></a>'
96
96
  }
97
- const expected = '<p><a title="This link will take you away from steemit.com" class="markdown-video-link markdown-video-link-dtube" data-embed-src="https://emb.d.tube/#!/scottcbusiness/g04n2bbp"><img class="no-replace video-thumbnail" src="https://images.ecency.com/p/46aP2QbqUqBqwzwxM6L1P6uLNceBDDCM6xyDJFx6ANhENRd3gJWJH7TiVR91QZ1KBcdAdZruQE35PBpQ3jUvkNK4mJqZ.png?format=match&amp;mode=fit" /><span class="markdown-video-play"></span></a></p>'
97
+ const expected = '<p dir=\"auto\"><a title="This link will take you away from steemit.com" class="markdown-video-link markdown-video-link-dtube" data-embed-src="https://emb.d.tube/#!/scottcbusiness/g04n2bbp"><img class="no-replace video-thumbnail" src="https://images.ecency.com/p/46aP2QbqUqBqwzwxM6L1P6uLNceBDDCM6xyDJFx6ANhENRd3gJWJH7TiVR91QZ1KBcdAdZruQE35PBpQ3jUvkNK4mJqZ.png?format=match&amp;mode=fit" /><span class="markdown-video-play"></span></a></p>'
98
98
 
99
99
  expect(markdown2Html(input)).toBe(expected)
100
100
  })
@@ -106,7 +106,7 @@ describe('Markdown2Html', () => {
106
106
  last_update: '2020-05-10T09:15:21',
107
107
  body: 'https://d.tube/#!/v/techcoderx/QmVdEYicJwiTxSk2U9ER1Yc8Rumb1Nek4KynqAYGyQs7ga'
108
108
  }
109
- const expected = '<p><a class="markdown-video-link markdown-video-link-dtube" data-embed-src="https://emb.d.tube/#!/techcoderx/QmVdEYicJwiTxSk2U9ER1Yc8Rumb1Nek4KynqAYGyQs7ga"><span class="markdown-video-play"></span></a></p>'
109
+ const expected = '<p dir=\"auto\"><a class="markdown-video-link markdown-video-link-dtube" data-embed-src="https://emb.d.tube/#!/techcoderx/QmVdEYicJwiTxSk2U9ER1Yc8Rumb1Nek4KynqAYGyQs7ga"><span class="markdown-video-play"></span></a></p>'
110
110
 
111
111
  expect(markdown2Html(input)).toBe(expected)
112
112
  })
@@ -118,7 +118,7 @@ describe('Markdown2Html', () => {
118
118
  last_update: '2020-05-10T09:15:21',
119
119
  body: 'https://d.tube/v/techcoderx/QmVdEYicJwiTxSk2U9ER1Yc8Rumb1Nek4KynqAYGyQs7ga'
120
120
  }
121
- const expected = '<p><a class="markdown-video-link markdown-video-link-dtube" data-embed-src="https://emb.d.tube/#!/techcoderx/QmVdEYicJwiTxSk2U9ER1Yc8Rumb1Nek4KynqAYGyQs7ga"><span class="markdown-video-play"></span></a></p>'
121
+ const expected = '<p dir=\"auto\"><a class="markdown-video-link markdown-video-link-dtube" data-embed-src="https://emb.d.tube/#!/techcoderx/QmVdEYicJwiTxSk2U9ER1Yc8Rumb1Nek4KynqAYGyQs7ga"><span class="markdown-video-play"></span></a></p>'
122
122
 
123
123
  expect(markdown2Html(input)).toBe(expected)
124
124
  })
@@ -130,7 +130,7 @@ describe('Markdown2Html', () => {
130
130
  last_update: '2019-05-10T09:15:21',
131
131
  body: '<a href=\'https://hivesigner.com/sign/account-witness-vote?witness=talhasch\'>vote @talhasch</a>'
132
132
  }
133
- const expected = '<p><a class="markdown-witnesses-link" data-href="https://hivesigner.com/sign/account-witness-vote?witness=talhasch">vote @talhasch</a></p>'
133
+ const expected = '<p dir=\"auto\"><a class="markdown-witnesses-link" data-href="https://hivesigner.com/sign/account-witness-vote?witness=talhasch">vote @talhasch</a></p>'
134
134
 
135
135
  expect(markdown2Html(input)).toBe(expected)
136
136
  })
@@ -142,7 +142,7 @@ describe('Markdown2Html', () => {
142
142
  last_update: '2019-05-10T09:15:21',
143
143
  body: 'click <a href=\'https://loremipsum.com/foo/bar.html\'>here</a> to visit'
144
144
  }
145
- const expected = '<p>click <a class="markdown-external-link" data-href="https://loremipsum.com/foo/bar.html">here</a> to visit</p>'
145
+ const expected = '<p dir=\"auto\">click <a class="markdown-external-link" data-href="https://loremipsum.com/foo/bar.html">here</a> to visit</p>'
146
146
 
147
147
  expect(markdown2Html(input)).toBe(expected)
148
148
  })
@@ -227,7 +227,7 @@ describe('Markdown2Html', () => {
227
227
  body: 'lorem ipsum @dolor sit amet'
228
228
  }
229
229
  let expected =
230
- '<p><span>lorem ipsum <a class="markdown-author-link" data-author="dolor">@dolor</a> sit amet</span></p>'
230
+ '<p dir=\"auto\"><span>lorem ipsum <a class="markdown-author-link" data-author="dolor">@dolor</a> sit amet</span></p>'
231
231
  expect(markdown2Html(input)).toBe(expected)
232
232
 
233
233
  input = {
@@ -237,7 +237,7 @@ describe('Markdown2Html', () => {
237
237
  body: '@lorem ipsum @dolor sit amet'
238
238
  }
239
239
  expected =
240
- '<p><span><a class="markdown-author-link" data-author="lorem">@lorem</a> ipsum <a class="markdown-author-link" data-author="dolor">@dolor</a> sit amet</span></p>'
240
+ '<p dir=\"auto\"><span><a class="markdown-author-link" data-author="lorem">@lorem</a> ipsum <a class="markdown-author-link" data-author="dolor">@dolor</a> sit amet</span></p>'
241
241
  expect(markdown2Html(input)).toBe(expected)
242
242
 
243
243
 
@@ -248,7 +248,7 @@ describe('Markdown2Html', () => {
248
248
  body: '@lorem @ipsum @dolor sit amet'
249
249
  }
250
250
  expected =
251
- '<p><span><a class="markdown-author-link" data-author="lorem">@lorem</a> <a class="markdown-author-link" data-author="ipsum">@ipsum</a> <a class="markdown-author-link" data-author="dolor">@dolor</a> sit amet</span></p>'
251
+ '<p dir=\"auto\"><span><a class="markdown-author-link" data-author="lorem">@lorem</a> <a class="markdown-author-link" data-author="ipsum">@ipsum</a> <a class="markdown-author-link" data-author="dolor">@dolor</a> sit amet</span></p>'
252
252
  expect(markdown2Html(input)).toBe(expected)
253
253
 
254
254
 
@@ -259,7 +259,7 @@ describe('Markdown2Html', () => {
259
259
  body: '@lorem @ipsum @dolor \n @sit amet'
260
260
  }
261
261
  expected =
262
- '<p><span><a class="markdown-author-link" data-author="lorem">@lorem</a> <a class="markdown-author-link" data-author="ipsum">@ipsum</a> <a class="markdown-author-link" data-author="dolor">@dolor</a></span><br /><span>\n<a class="markdown-author-link" data-author="sit">@sit</a> amet</span></p>'
262
+ '<p dir=\"auto\"><span><a class="markdown-author-link" data-author="lorem">@lorem</a> <a class="markdown-author-link" data-author="ipsum">@ipsum</a> <a class="markdown-author-link" data-author="dolor">@dolor</a></span><br /><span>\n<a class="markdown-author-link" data-author="sit">@sit</a> amet</span></p>'
263
263
  expect(markdown2Html(input)).toBe(expected)
264
264
 
265
265
 
@@ -270,7 +270,7 @@ describe('Markdown2Html', () => {
270
270
  body: '@lorem @ipsum @dolor \n @Sit amet'
271
271
  }
272
272
  expected =
273
- '<p><span><a class="markdown-author-link" data-author="lorem">@lorem</a> <a class="markdown-author-link" data-author="ipsum">@ipsum</a> <a class="markdown-author-link" data-author="dolor">@dolor</a></span><br /><span>\n<a class="markdown-author-link" data-author="sit">@Sit</a> amet</span></p>'
273
+ '<p dir=\"auto\"><span><a class="markdown-author-link" data-author="lorem">@lorem</a> <a class="markdown-author-link" data-author="ipsum">@ipsum</a> <a class="markdown-author-link" data-author="dolor">@dolor</a></span><br /><span>\n<a class="markdown-author-link" data-author="sit">@Sit</a> amet</span></p>'
274
274
  expect(markdown2Html(input)).toBe(expected)
275
275
  })
276
276
 
@@ -282,7 +282,7 @@ describe('Markdown2Html', () => {
282
282
  body: 'lorem ipsum #dolor sit amet'
283
283
  }
284
284
  let expected =
285
- '<p><span>lorem ipsum <a class="markdown-tag-link" data-tag="dolor">#dolor</a> sit amet</span></p>'
285
+ '<p dir=\"auto\"><span>lorem ipsum <a class="markdown-tag-link" data-tag="dolor">#dolor</a> sit amet</span></p>'
286
286
  expect(markdown2Html(input)).toBe(expected)
287
287
 
288
288
  input = {
@@ -292,7 +292,7 @@ describe('Markdown2Html', () => {
292
292
  body: '#lorem ipsum #dolor sit amet'
293
293
  }
294
294
  expected =
295
- '<p><span><a class="markdown-tag-link" data-tag="lorem">#lorem</a> ipsum <a class="markdown-tag-link" data-tag="dolor">#dolor</a> sit amet</span></p>'
295
+ '<p dir=\"auto\"><span><a class="markdown-tag-link" data-tag="lorem">#lorem</a> ipsum <a class="markdown-tag-link" data-tag="dolor">#dolor</a> sit amet</span></p>'
296
296
  expect(markdown2Html(input)).toBe(expected)
297
297
 
298
298
  input = {
@@ -302,7 +302,7 @@ describe('Markdown2Html', () => {
302
302
  body: '#lorem #ipsum #dolor sit amet'
303
303
  }
304
304
  expected =
305
- '<p><span><a class="markdown-tag-link" data-tag="lorem">#lorem</a> <a class="markdown-tag-link" data-tag="ipsum">#ipsum</a> <a class="markdown-tag-link" data-tag="dolor">#dolor</a> sit amet</span></p>'
305
+ '<p dir=\"auto\"><span><a class="markdown-tag-link" data-tag="lorem">#lorem</a> <a class="markdown-tag-link" data-tag="ipsum">#ipsum</a> <a class="markdown-tag-link" data-tag="dolor">#dolor</a> sit amet</span></p>'
306
306
  expect(markdown2Html(input)).toBe(expected)
307
307
 
308
308
  input = {
@@ -312,7 +312,7 @@ describe('Markdown2Html', () => {
312
312
  body: '#lorem #ipsum #dolor \n #sit amet'
313
313
  }
314
314
  expected =
315
- '<p><span><a class="markdown-tag-link" data-tag="lorem">#lorem</a> <a class="markdown-tag-link" data-tag="ipsum">#ipsum</a> <a class="markdown-tag-link" data-tag="dolor">#dolor</a></span><br /><span>\n<a class="markdown-tag-link" data-tag="sit">#sit</a> amet</span></p>'
315
+ '<p dir=\"auto\"><span><a class="markdown-tag-link" data-tag="lorem">#lorem</a> <a class="markdown-tag-link" data-tag="ipsum">#ipsum</a> <a class="markdown-tag-link" data-tag="dolor">#dolor</a></span><br /><span>\n<a class="markdown-tag-link" data-tag="sit">#sit</a> amet</span></p>'
316
316
  expect(markdown2Html(input)).toBe(expected)
317
317
 
318
318
  input = {
@@ -322,7 +322,7 @@ describe('Markdown2Html', () => {
322
322
  body: '#lorem #ipsum #dolor \n #Sit amet'
323
323
  }
324
324
  expected =
325
- '<p><span><a class="markdown-tag-link" data-tag="lorem">#lorem</a> <a class="markdown-tag-link" data-tag="ipsum">#ipsum</a> <a class="markdown-tag-link" data-tag="dolor">#dolor</a></span><br /><span>\n<a class="markdown-tag-link" data-tag="sit">#Sit</a> amet</span></p>'
325
+ '<p dir=\"auto\"><span><a class="markdown-tag-link" data-tag="lorem">#lorem</a> <a class="markdown-tag-link" data-tag="ipsum">#ipsum</a> <a class="markdown-tag-link" data-tag="dolor">#dolor</a></span><br /><span>\n<a class="markdown-tag-link" data-tag="sit">#Sit</a> amet</span></p>'
326
326
  expect(markdown2Html(input)).toBe(expected)
327
327
 
328
328
  input = {
@@ -331,7 +331,7 @@ describe('Markdown2Html', () => {
331
331
  last_update: '2019-05-10T09:15:21',
332
332
  body: 'you are #1'
333
333
  }
334
- expected = '<p>you are #1</p>'
334
+ expected = '<p dir=\"auto\">you are #1</p>'
335
335
  expect(markdown2Html(input)).toBe(expected)
336
336
 
337
337
  input = {
@@ -341,7 +341,7 @@ describe('Markdown2Html', () => {
341
341
  body: 'you are #1 #steemit-promo'
342
342
  }
343
343
  expected =
344
- '<p><span>you are #1 <a class="markdown-tag-link" data-tag="steemit-promo">#steemit-promo</a></span></p>'
344
+ '<p dir=\"auto\"><span>you are #1 <a class="markdown-tag-link" data-tag="steemit-promo">#steemit-promo</a></span></p>'
345
345
  expect(markdown2Html(input)).toBe(expected)
346
346
  })
347
347
 
@@ -353,7 +353,7 @@ describe('Markdown2Html', () => {
353
353
  body: 'lorem ipsum #dolor sit @amet'
354
354
  }
355
355
  let expected =
356
- '<p><span>lorem ipsum <a class="markdown-tag-link" data-tag="dolor">#dolor</a> sit <a class="markdown-author-link" data-author="amet">@amet</a></span></p>'
356
+ '<p dir=\"auto\"><span>lorem ipsum <a class="markdown-tag-link" data-tag="dolor">#dolor</a> sit <a class="markdown-author-link" data-author="amet">@amet</a></span></p>'
357
357
  expect(markdown2Html(input)).toBe(expected)
358
358
 
359
359
  input = {
@@ -362,7 +362,7 @@ describe('Markdown2Html', () => {
362
362
  last_update: '2019-05-10T09:15:21',
363
363
  body: 'lorem ipsum @#dolor sit amet'
364
364
  }
365
- expected = '<p>lorem ipsum @#dolor sit amet</p>'
365
+ expected = '<p dir=\"auto\">lorem ipsum @#dolor sit amet</p>'
366
366
  expect(markdown2Html(input)).toBe(expected)
367
367
  })
368
368
 
@@ -384,13 +384,13 @@ describe('Markdown2Html', () => {
384
384
  body: '<a href="foo">foo</a>'
385
385
  }
386
386
  expect(markdown2Html(input).trim()).toBe(
387
- '<p><a class="markdown-external-link" data-href="https://foo">foo</a></p>'
387
+ '<p dir=\"auto\"><a class="markdown-external-link" data-href="https://foo">foo</a></p>'
388
388
  )
389
389
  })
390
390
 
391
391
  it('23- Test with not obj param', () => {
392
392
  expect(markdown2Html('<a href="foo">foo</a> lorem ipsum **dolor** sit amet').trim()).toBe(
393
- '<p><a class="markdown-external-link" data-href="https://foo">foo</a> lorem ipsum <strong>dolor</strong> sit amet</p>'
393
+ '<p dir=\"auto\"><a class="markdown-external-link" data-href="https://foo">foo</a> lorem ipsum <strong>dolor</strong> sit amet</p>'
394
394
  )
395
395
  })
396
396
 
@@ -401,7 +401,7 @@ describe('Markdown2Html', () => {
401
401
  last_update: '2019-05-10T09:15:21',
402
402
  body: '[Approve](https://beta.hivesigner.com/sign/update-proposal-votes?proposal_ids=[39]&approve=true) [Unapprove](https://beta.hivesigner.com/sign/update-proposal-votes?proposal_ids=%5B41%5D&approve=false)'
403
403
  }
404
- const expected = '<p><a class="markdown-proposal-link" data-href="https://beta.hivesigner.com/sign/update-proposal-votes?proposal_ids=[39]&amp;approve=true" data-proposal="39">Approve</a> <a class="markdown-proposal-link" data-href="https://beta.hivesigner.com/sign/update-proposal-votes?proposal_ids=%5B41%5D&amp;approve=false" data-proposal="41">Unapprove</a></p>'
404
+ const expected = '<p dir=\"auto\"><a class="markdown-proposal-link" data-href="https://beta.hivesigner.com/sign/update-proposal-votes?proposal_ids=[39]&amp;approve=true" data-proposal="39">Approve</a> <a class="markdown-proposal-link" data-href="https://beta.hivesigner.com/sign/update-proposal-votes?proposal_ids=%5B41%5D&amp;approve=false" data-proposal="41">Unapprove</a></p>'
405
405
  expect(markdown2Html(input)).toBe(expected)
406
406
  })
407
407
 
@@ -412,7 +412,7 @@ describe('Markdown2Html', () => {
412
412
  last_update: '2019-05-10T09:15:21',
413
413
  body: 'https://www.twitch.tv/steemspacely'
414
414
  }
415
- const expected = '<p><a class="markdown-video-link markdown-video-link-twitch"><iframe frameborder="0" allowfullscreen="true" src="https://player.twitch.tv/?channel=steemspacely&amp;parent=ecency.com&amp;autoplay=false"></iframe></a></p>'
415
+ const expected = '<p dir=\"auto\"><a class="markdown-video-link markdown-video-link-twitch"><iframe frameborder="0" allowfullscreen="true" src="https://player.twitch.tv/?channel=steemspacely&amp;parent=ecency.com&amp;autoplay=false"></iframe></a></p>'
416
416
 
417
417
  expect(markdown2Html(input)).toBe(expected)
418
418
  })
@@ -424,7 +424,7 @@ describe('Markdown2Html', () => {
424
424
  last_update: '2019-05-10T09:15:21',
425
425
  body: '[![](https://img.3speakcontent.online/xrhjxocx/post.png?v2)](https://3speak.online/watch?v=wehmoen/xrhjxocx)'
426
426
  }
427
- const expected = '<p><a class="markdown-video-link markdown-video-link-speak" data-embed-src="https://3speak.online/embed?v=wehmoen/xrhjxocx"><img class="no-replace video-thumbnail" src="https://images.ecency.com/p/2ufhwNgM3qHKBGVeU2TMMqPBjdB17MRuf4Q7vGrmGMtTn6yFtvW3Lt9t5v1c3so7UFhWDYh9B.png?format=match&amp;mode=fit" /><span class="markdown-video-play"></span></a></p>'
427
+ const expected = '<p dir=\"auto\"><a class="markdown-video-link markdown-video-link-speak" data-embed-src="https://3speak.online/embed?v=wehmoen/xrhjxocx"><img class="no-replace video-thumbnail" src="https://images.ecency.com/p/2ufhwNgM3qHKBGVeU2TMMqPBjdB17MRuf4Q7vGrmGMtTn6yFtvW3Lt9t5v1c3so7UFhWDYh9B.png?format=match&amp;mode=fit" /><span class="markdown-video-play"></span></a></p>'
428
428
 
429
429
  expect(markdown2Html(input)).toBe(expected)
430
430
  })
@@ -436,7 +436,7 @@ describe('Markdown2Html', () => {
436
436
  last_update: '2029-05-10T09:15:21',
437
437
  body: '[![](https://img.3speakcontent.co/blnmdkjt/post.png)](https://3speak.co/watch?v=theycallmedan/blnmdkjt) [Watch on 3Speak](https://3speak.co/watch?v=theycallmedan/blnmdkjt)'
438
438
  }
439
- const expected = '<p><a class="markdown-video-link markdown-video-link-speak" data-embed-src="https://3speak.co/embed?v=theycallmedan/blnmdkjt"><img class="no-replace video-thumbnail" src="https://images.ecency.com/p/CQdwDW6BZfWWtctopKyTJuDRdBH4KXwm9ijE6sZXe5MveWF3nUu4zXXBFUau8NS.png?format=match&amp;mode=fit" /><span class="markdown-video-play"></span></a> <a class="markdown-external-link" data-href="https://3speak.co/watch?v=theycallmedan/blnmdkjt">Watch on 3Speak</a></p>'
439
+ const expected = '<p dir=\"auto\"><a class="markdown-video-link markdown-video-link-speak" data-embed-src="https://3speak.co/embed?v=theycallmedan/blnmdkjt"><img class="no-replace video-thumbnail" src="https://images.ecency.com/p/CQdwDW6BZfWWtctopKyTJuDRdBH4KXwm9ijE6sZXe5MveWF3nUu4zXXBFUau8NS.png?format=match&amp;mode=fit" /><span class="markdown-video-play"></span></a> <a class="markdown-external-link" data-href="https://3speak.co/watch?v=theycallmedan/blnmdkjt">Watch on 3Speak</a></p>'
440
440
 
441
441
  expect(markdown2Html(input)).toBe(expected)
442
442
  })
@@ -448,7 +448,7 @@ describe('Markdown2Html', () => {
448
448
  last_update: '2019-05-10T09:15:21',
449
449
  body: 'https://peakd.com/@demo/tests'
450
450
  }
451
- const expected = '<p><a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"demo\" data-permlink=\"tests\">@demo/tests</a></p>'
451
+ const expected = '<p dir=\"auto\"><a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"demo\" data-permlink=\"tests\">@demo/tests</a></p>'
452
452
 
453
453
  expect(markdown2Html(input)).toBe(expected)
454
454
  })
@@ -460,7 +460,7 @@ describe('Markdown2Html', () => {
460
460
  last_update: '2019-05-10T09:15:21',
461
461
  body: 'https://youtu.be/UuyS7YAkECA?t=295s'
462
462
  }
463
- const expected = '<p><a class="markdown-video-link markdown-video-link-youtube" data-embed-src="https://www.youtube.com/embed/UuyS7YAkECA?autoplay=1" data-youtube="UuyS7YAkECA" data-start-time="295"><img class="no-replace video-thumbnail" src="https://images.ecency.com/p/S5Eokt4BcQdk7EHeT1aYjzebg2hC7hkthT45eAMp88bZ44hfAQDm6BtJw2H53aq1Tpn1cu4.png?format=match&amp;mode=fit" /><span class="markdown-video-play"></span></a></p>'
463
+ const expected = '<p dir=\"auto\"><a class="markdown-video-link markdown-video-link-youtube" data-embed-src="https://www.youtube.com/embed/UuyS7YAkECA?autoplay=1" data-youtube="UuyS7YAkECA" data-start-time="295"><img class="no-replace video-thumbnail" src="https://images.ecency.com/p/S5Eokt4BcQdk7EHeT1aYjzebg2hC7hkthT45eAMp88bZ44hfAQDm6BtJw2H53aq1Tpn1cu4.png?format=match&amp;mode=fit" /><span class="markdown-video-play"></span></a></p>'
464
464
 
465
465
  expect(markdown2Html(input)).toBe(expected)
466
466
  })
@@ -472,7 +472,7 @@ describe('Markdown2Html', () => {
472
472
  last_update: '2019-05-10T09:15:21',
473
473
  body: '[Voice: the criteria for success or failure](https://app.voice.com/post/@lukestokes/voice-the-criteria-for-success-or-failure-1597453134-597)'
474
474
  }
475
- const expected = '<p><a class="markdown-external-link" data-href="https://app.voice.com/post/@lukestokes/voice-the-criteria-for-success-or-failure-1597453134-597">Voice: the criteria for success or failure</a></p>'
475
+ const expected = '<p dir=\"auto\"><a class="markdown-external-link" data-href="https://app.voice.com/post/@lukestokes/voice-the-criteria-for-success-or-failure-1597453134-597">Voice: the criteria for success or failure</a></p>'
476
476
 
477
477
  expect(markdown2Html(input)).toBe(expected)
478
478
  })
@@ -484,7 +484,7 @@ describe('Markdown2Html', () => {
484
484
  last_update: '2019-05-10T09:15:21',
485
485
  body: '[Voice: the criteria for success or failure](https://app.voice.com/@lukestokes/voice-the-criteria-for-success-or-failure-1597453134-597)'
486
486
  }
487
- const expected = '<p><a class="markdown-external-link" data-href="https://app.voice.com/@lukestokes/voice-the-criteria-for-success-or-failure-1597453134-597">Voice: the criteria for success or failure</a></p>'
487
+ const expected = '<p dir=\"auto\"><a class="markdown-external-link" data-href="https://app.voice.com/@lukestokes/voice-the-criteria-for-success-or-failure-1597453134-597">Voice: the criteria for success or failure</a></p>'
488
488
 
489
489
  expect(markdown2Html(input)).toBe(expected)
490
490
  })
@@ -496,7 +496,7 @@ describe('Markdown2Html', () => {
496
496
  last_update: '2019-05-10T09:15:21',
497
497
  body: 'https://peakd.com/tag/@demo/tests and https://steemit.com/test/@demo/post'
498
498
  }
499
- const expected = '<p><a class=\"markdown-post-link\" data-tag=\"tag\" data-author=\"demo\" data-permlink=\"tests\">@demo/tests</a> and <a class=\"markdown-external-link\" data-href=\"https://steemit.com/test/@demo/post\">https://steemit.com/test/@demo/post</a></p>'
499
+ const expected = '<p dir=\"auto\"><a class=\"markdown-post-link\" data-tag=\"tag\" data-author=\"demo\" data-permlink=\"tests\">@demo/tests</a> and <a class=\"markdown-external-link\" data-href=\"https://steemit.com/test/@demo/post\">https://steemit.com/test/@demo/post</a></p>'
500
500
 
501
501
  expect(markdown2Html(input)).toBe(expected)
502
502
  })
@@ -508,7 +508,7 @@ describe('Markdown2Html', () => {
508
508
  last_update: '2019-05-10T09:15:21',
509
509
  body: 'https://peakd.com/@demo and https://steemit.com/@demo123'
510
510
  }
511
- const expected = '<p><a class="markdown-author-link" data-author="demo">@demo</a> and <a class="markdown-external-link" data-href="https://steemit.com/@demo123">https://steemit.com/@demo123</a></p>'
511
+ const expected = '<p dir=\"auto\"><a class="markdown-author-link" data-author="demo">@demo</a> and <a class="markdown-external-link" data-href="https://steemit.com/@demo123">https://steemit.com/@demo123</a></p>'
512
512
 
513
513
  expect(markdown2Html(input)).toBe(expected)
514
514
  })
@@ -520,7 +520,7 @@ describe('Markdown2Html', () => {
520
520
  last_update: '2019-05-10T09:15:21',
521
521
  body: 'this is link https://ipfs.io/ipfs/bafybeihbqfrcrbr6jkf77rdve3nbxjzkfgmeneaw2x5s43qdgpe26cha6q'
522
522
  }
523
- const expected = '<p>this is link <a data-href="https://ipfs.io/ipfs/bafybeihbqfrcrbr6jkf77rdve3nbxjzkfgmeneaw2x5s43qdgpe26cha6q" class="markdown-img-link"><img src="https://images.ecency.com/p/2923mN3pnd7PiPXAMdj9UuE6SsjvQJDHj5VpTTCNs3tkJu9JC9Pu9qXSi5Ys5PYtkaRx6ErTnFVzh1WQxWS45rvr6Q4rfUooAM242oyKeihwnx.png?format=match&amp;mode=fit" /></a></p>'
523
+ const expected = '<p dir=\"auto\">this is link <a data-href="https://ipfs.io/ipfs/bafybeihbqfrcrbr6jkf77rdve3nbxjzkfgmeneaw2x5s43qdgpe26cha6q" class="markdown-img-link"><img src="https://images.ecency.com/p/2923mN3pnd7PiPXAMdj9UuE6SsjvQJDHj5VpTTCNs3tkJu9JC9Pu9qXSi5Ys5PYtkaRx6ErTnFVzh1WQxWS45rvr6Q4rfUooAM242oyKeihwnx.png?format=match&amp;mode=fit" /></a></p>'
524
524
 
525
525
  expect(markdown2Html(input)).toBe(expected)
526
526
  })
@@ -532,7 +532,7 @@ describe('Markdown2Html', () => {
532
532
  last_update: '2019-05-10T09:15:24',
533
533
  body: 'this is a link https://ipfs.io/ipfs/bafybeihbqfrcrbr6jkf77rdve3nbxjzkfgmeneaw2x5s43qdgpe26cha6q/#home'
534
534
  }
535
- const expected = '<p>this is a link <a class="markdown-external-link" data-href="https://ipfs.io/ipfs/bafybeihbqfrcrbr6jkf77rdve3nbxjzkfgmeneaw2x5s43qdgpe26cha6q/#home">https://ipfs.io/ipfs/bafybeihbqfrcrbr6jkf77rdve3nbxjzkfgmeneaw2x5s43qdgpe26cha6q/#home</a></p>'
535
+ const expected = '<p dir=\"auto\">this is a link <a class="markdown-external-link" data-href="https://ipfs.io/ipfs/bafybeihbqfrcrbr6jkf77rdve3nbxjzkfgmeneaw2x5s43qdgpe26cha6q/#home">https://ipfs.io/ipfs/bafybeihbqfrcrbr6jkf77rdve3nbxjzkfgmeneaw2x5s43qdgpe26cha6q/#home</a></p>'
536
536
 
537
537
  expect(markdown2Html(input)).toBe(expected)
538
538
  })
@@ -544,7 +544,7 @@ describe('Markdown2Html', () => {
544
544
  last_update: '2019-05-10T09:15:21',
545
545
  body: 'this is link https://twitter.com/DeWaarheid_/status/1320603494836015105'
546
546
  }
547
- const expected = '<p>this is link <blockquote class="twitter-tweet"><p>https://twitter.com/DeWaarheid_/status/1320603494836015105</p>- <a href="https://twitter.com/DeWaarheid_/status/1320603494836015105">DeWaarheid_</a></blockquote></p>'
547
+ const expected = '<p dir=\"auto\">this is link <blockquote class="twitter-tweet"><p>https://twitter.com/DeWaarheid_/status/1320603494836015105</p>- <a href="https://twitter.com/DeWaarheid_/status/1320603494836015105">DeWaarheid_</a></blockquote></p>'
548
548
 
549
549
  expect(markdown2Html(input)).toBe(expected)
550
550
  })
@@ -556,7 +556,7 @@ describe('Markdown2Html', () => {
556
556
  last_update: '2019-05-10T09:15:21',
557
557
  body: 'this is link https://peakd.com/c/hive-106444/trending and markdown link [Manipulation Station](https://peakd.com/c/hive-122516/trending)'
558
558
  }
559
- const expected = '<p>this is link <a class="markdown-community-link" data-community="hive-106444" data-filter="trending">trending/hive-106444</a> and markdown link <a class="markdown-community-link" data-community="hive-122516" data-filter="trending">Manipulation Station</a></p>'
559
+ const expected = '<p dir=\"auto\">this is link <a class="markdown-community-link" data-community="hive-106444" data-filter="trending">trending/hive-106444</a> and markdown link <a class="markdown-community-link" data-community="hive-122516" data-filter="trending">Manipulation Station</a></p>'
560
560
 
561
561
  expect(markdown2Html(input)).toBe(expected)
562
562
  })
@@ -568,7 +568,7 @@ describe('Markdown2Html', () => {
568
568
  last_update: '2019-05-10T09:15:21',
569
569
  body: 'this is link <iframe src="https://cdn.dapplr.in/file/dapplr-videos/sandymeyer/pEm9SdqNYJ6vntQCAalWU6dNC9zegQVl.mp4" ></iframe>'
570
570
  }
571
- const expected = '<p>this is link <iframe src="https://cdn.dapplr.in/file/dapplr-videos/sandymeyer/pEm9SdqNYJ6vntQCAalWU6dNC9zegQVl.mp4" sandbox="allow-scripts allow-same-origin" frameborder="0" allowfullscreen="true"></iframe></p>'
571
+ const expected = '<p dir=\"auto\">this is link <iframe src="https://cdn.dapplr.in/file/dapplr-videos/sandymeyer/pEm9SdqNYJ6vntQCAalWU6dNC9zegQVl.mp4" sandbox="allow-scripts allow-same-origin" frameborder="0" allowfullscreen="true"></iframe></p>'
572
572
 
573
573
  expect(markdown2Html(input)).toBe(expected)
574
574
  })
@@ -580,7 +580,7 @@ describe('Markdown2Html', () => {
580
580
  last_update: '2019-05-10T09:15:21',
581
581
  body: 'this is link <iframe id="lbry-iframe" width="560" height="315" src="https://lbry.tv/$/embed/epic-drone-video-sunset-swiss/38f32ec6de375352512a01c37ec9ef5e7fc35958?r=4N4ga6kbnyKXLSUCHtyfF7zh57vvJwfu" allowfullscreen></iframe> '
582
582
  }
583
- const expected = '<p>this is link <iframe src="https://lbry.tv/$/embed/epic-drone-video-sunset-swiss/38f32ec6de375352512a01c37ec9ef5e7fc35958?r=4N4ga6kbnyKXLSUCHtyfF7zh57vvJwfu" allowfullscreen="allowfullscreen" frameborder="0"></iframe></p>'
583
+ const expected = '<p dir=\"auto\">this is link <iframe src="https://lbry.tv/$/embed/epic-drone-video-sunset-swiss/38f32ec6de375352512a01c37ec9ef5e7fc35958?r=4N4ga6kbnyKXLSUCHtyfF7zh57vvJwfu" allowfullscreen="allowfullscreen" frameborder="0"></iframe></p>'
584
584
 
585
585
  expect(markdown2Html(input)).toBe(expected)
586
586
  })
@@ -592,7 +592,7 @@ describe('Markdown2Html', () => {
592
592
  last_update: '2019-05-21T09:19:21',
593
593
  body: '<a href=\'https://ecency.com/@good-karma/wallet\'>click here</a>'
594
594
  }
595
- const expected = '<p><a href="https://ecency.com/@good-karma/wallet" class="markdown-profile-link">click here</a></p>'
595
+ const expected = '<p dir=\"auto\"><a href="https://ecency.com/@good-karma/wallet" class="markdown-profile-link">click here</a></p>'
596
596
 
597
597
  expect(markdown2Html(input)).toBe(expected)
598
598
  })
@@ -604,7 +604,7 @@ describe('Markdown2Html', () => {
604
604
  last_update: '2019-05-10T09:15:21',
605
605
  body: 'this is link <iframe src="https://archive.org/embed/VoyagetothePlanetofPrehistoricWomen" width="640" height="480" frameborder="0" webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen></iframe>'
606
606
  }
607
- const expected = '<p>this is link <iframe src="https://archive.org/embed/VoyagetothePlanetofPrehistoricWomen" frameborder="0" webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen="allowfullscreen"></iframe></p>'
607
+ const expected = '<p dir=\"auto\">this is link <iframe src="https://archive.org/embed/VoyagetothePlanetofPrehistoricWomen" frameborder="0" webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen="allowfullscreen"></iframe></p>'
608
608
 
609
609
  expect(markdown2Html(input)).toBe(expected)
610
610
  })
@@ -616,7 +616,7 @@ describe('Markdown2Html', () => {
616
616
  last_update: '2019-05-10T09:15:21',
617
617
  body: 'this is link https://open.spotify.com/playlist/7JG1cEnaIT6CSzloyNI6tU?si=7MCcmFEZQCebLvzqehq81Q '
618
618
  }
619
- const expected = '<p>this is link <a class=\"markdown-audio-link markdown-audio-link-spotify\"><iframe frameborder=\"0\" allowfullscreen=\"true\" src=\"https://open.spotify.com/embed/playlist/7JG1cEnaIT6CSzloyNI6tU?si=7MCcmFEZQCebLvzqehq81Q\" sandbox=\"allow-scripts allow-same-origin allow-popups\"></iframe></a></p>'
619
+ const expected = '<p dir=\"auto\">this is link <a class=\"markdown-audio-link markdown-audio-link-spotify\"><iframe frameborder=\"0\" allowfullscreen=\"true\" src=\"https://open.spotify.com/embed/playlist/7JG1cEnaIT6CSzloyNI6tU?si=7MCcmFEZQCebLvzqehq81Q\" sandbox=\"allow-scripts allow-same-origin allow-popups\"></iframe></a></p>'
620
620
 
621
621
  expect(markdown2Html(input)).toBe(expected)
622
622
  })
@@ -628,7 +628,7 @@ describe('Markdown2Html', () => {
628
628
  last_update: '2019-05-10T09:15:21',
629
629
  body: 'this is embed link <iframe src="https://open.spotify.com/embed/album/6AORtDjduMM3bupSWzbTSG" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe> '
630
630
  }
631
- const expected = '<p>this is embed link <iframe src=\"https://open.spotify.com/embed/album/6AORtDjduMM3bupSWzbTSG\" frameborder=\"0\" sandbox=\"allow-scripts allow-same-origin allow-popups\"></iframe></p>'
631
+ const expected = '<p dir=\"auto\">this is embed link <iframe src=\"https://open.spotify.com/embed/album/6AORtDjduMM3bupSWzbTSG\" frameborder=\"0\" sandbox=\"allow-scripts allow-same-origin allow-popups\"></iframe></p>'
632
632
 
633
633
  expect(markdown2Html(input)).toBe(expected)
634
634
  })
@@ -640,7 +640,7 @@ describe('Markdown2Html', () => {
640
640
  last_update: '2019-05-10T09:15:21',
641
641
  body: 'this is link <iframe width="560" height="315" src="https://emb.d.tube/#!/keepskating420/QmZyu5uPfm2wvEDJaSfCx9wwDBMEcDg5CoxbKKC2vjqubq" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'
642
642
  }
643
- const expected = '<p>this is link <iframe src="https://emb.d.tube/#!/keepskating420/QmZyu5uPfm2wvEDJaSfCx9wwDBMEcDg5CoxbKKC2vjqubq" frameborder="0" allowfullscreen="true" sandbox="allow-scripts allow-same-origin"></iframe></p>'
643
+ const expected = '<p dir=\"auto\">this is link <iframe src="https://emb.d.tube/#!/keepskating420/QmZyu5uPfm2wvEDJaSfCx9wwDBMEcDg5CoxbKKC2vjqubq" frameborder="0" allowfullscreen="true" sandbox="allow-scripts allow-same-origin"></iframe></p>'
644
644
 
645
645
  expect(markdown2Html(input)).toBe(expected)
646
646
  })
@@ -652,7 +652,7 @@ describe('Markdown2Html', () => {
652
652
  last_update: '2019-05-10T09:15:21',
653
653
  body: 'this is link <iframe width="640px" height="360px" src="https://www.vimm.tv/vandalgame/embed?autoplay=0" frameborder=0></iframe>'
654
654
  }
655
- const expected = '<p>this is link <iframe src="https://www.vimm.tv/vandalgame/embed?autoplay=0" frameborder="0" sandbox="allow-scripts allow-same-origin allow-popups" allowfullscreen="true"></iframe></p>'
655
+ const expected = '<p dir=\"auto\">this is link <iframe src="https://www.vimm.tv/vandalgame/embed?autoplay=0" frameborder="0" sandbox="allow-scripts allow-same-origin allow-popups" allowfullscreen="true"></iframe></p>'
656
656
 
657
657
  expect(markdown2Html(input)).toBe(expected)
658
658
  })
@@ -664,7 +664,7 @@ describe('Markdown2Html', () => {
664
664
  last_update: '2019-05-10T09:15:21',
665
665
  body: 'this is link https://peakd.com/ccc/jarvie/one-week-roadtrip-to-all-5-utah-national-parks-and-more'
666
666
  }
667
- const expected = '<p>this is link <a class=\"markdown-post-link\" data-tag=\"ccc\" data-author=\"jarvie\" data-permlink=\"one-week-roadtrip-to-all-5-utah-national-parks-and-more\">@jarvie/one-week-roadtrip-to-all-5-utah-national-parks-and-more</a></p>'
667
+ const expected = '<p dir=\"auto\">this is link <a class=\"markdown-post-link\" data-tag=\"ccc\" data-author=\"jarvie\" data-permlink=\"one-week-roadtrip-to-all-5-utah-national-parks-and-more\">@jarvie/one-week-roadtrip-to-all-5-utah-national-parks-and-more</a></p>'
668
668
 
669
669
  expect(markdown2Html(input)).toBe(expected)
670
670
  })
@@ -676,7 +676,7 @@ describe('Markdown2Html', () => {
676
676
  last_update: '2019-05-10T09:15:21',
677
677
  body: '[click here](https://peakd.com/@praetoria-cartel/wallet) direct link https://peakd.com/@praetoria-cartel/posts'
678
678
  }
679
- const expected = '<p><a href=\"https://ecency.com/@praetoria-cartel/wallet\" class=\"markdown-profile-link\">click here</a> direct link <a href=\"https://ecency.com/@praetoria-cartel/posts\" class=\"markdown-profile-link\">@praetoria-cartel/posts</a></p>'
679
+ const expected = '<p dir=\"auto\"><a href=\"https://ecency.com/@praetoria-cartel/wallet\" class=\"markdown-profile-link\">click here</a> direct link <a href=\"https://ecency.com/@praetoria-cartel/posts\" class=\"markdown-profile-link\">@praetoria-cartel/posts</a></p>'
680
680
 
681
681
  expect(markdown2Html(input)).toBe(expected)
682
682
  })
@@ -688,7 +688,7 @@ describe('Markdown2Html', () => {
688
688
  last_update: '2019-05-10T09:15:21',
689
689
  body: 'for history refer to this fine post /@offgridlife/proofofbrain-golden-rule-do-to-others-what-you-want-them-to-do-to-you and while you are in the community'
690
690
  }
691
- const expected = '<p><span>for history refer to this fine post <a class=\"markdown-post-link\" data-author=\"offgridlife\" data-tag=\"post\" data-permlink=\"proofofbrain-golden-rule-do-to-others-what-you-want-them-to-do-to-you\">@offgridlife/proofofbrain-golden-rule-do-to-others-what-you-want-them-to-do-to-you</a> and while you are in the community</span></p>'
691
+ const expected = '<p dir=\"auto\"><span>for history refer to this fine post <a class=\"markdown-post-link\" data-author=\"offgridlife\" data-tag=\"post\" data-permlink=\"proofofbrain-golden-rule-do-to-others-what-you-want-them-to-do-to-you\">@offgridlife/proofofbrain-golden-rule-do-to-others-what-you-want-them-to-do-to-you</a> and while you are in the community</span></p>'
692
692
 
693
693
  expect(markdown2Html(input)).toBe(expected)
694
694
  })
@@ -700,7 +700,7 @@ describe('Markdown2Html', () => {
700
700
  last_update: '2021-05-10T09:15:21',
701
701
  body: 'https://www.bitchute.com/video/DJJvTZQxMaNK/'
702
702
  }
703
- const expected = '<p><a class=\"markdown-video-link\" data-embed-src=\"https://www.bitchute.com/embed/DJJvTZQxMaNK/\"><span class=\"markdown-video-play\"></span></a></p>'
703
+ const expected = '<p dir=\"auto\"><a class=\"markdown-video-link\" data-embed-src=\"https://www.bitchute.com/embed/DJJvTZQxMaNK/\"><span class=\"markdown-video-play\"></span></a></p>'
704
704
  expect(markdown2Html(input)).toBe(expected)
705
705
  })
706
706
 
@@ -722,7 +722,7 @@ describe('Markdown2Html', () => {
722
722
  last_update: '2021-05-10T09:15:49',
723
723
  body: '<a href="/@hivesql"><img src="https://i.imgur.com/EPN8RW6.png"></a>'
724
724
  }
725
- const expected = '<p><a class=\"markdown-author-link\" data-author=\"hivesql\"><img src=\"https://images.ecency.com/p/2bP4pJr4wVimqCWjYimXJe2cnCgn8gbL3c5wQPJF23G.png?format=match&amp;mode=fit\" /></a></p>'
725
+ const expected = '<p dir=\"auto\"><a class=\"markdown-author-link\" data-author=\"hivesql\"><img src=\"https://images.ecency.com/p/2bP4pJr4wVimqCWjYimXJe2cnCgn8gbL3c5wQPJF23G.png?format=match&amp;mode=fit\" /></a></p>'
726
726
  expect(markdown2Html(input)).toBe(expected)
727
727
  })
728
728
 
@@ -733,7 +733,7 @@ describe('Markdown2Html', () => {
733
733
  last_update: '2021-05-10T09:15:49',
734
734
  body: '<a href="/@demo/test">test post</a>'
735
735
  }
736
- const expected = '<p><a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"demo\" data-permlink=\"test\">test post</a></p>'
736
+ const expected = '<p dir=\"auto\"><a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"demo\" data-permlink=\"test\">test post</a></p>'
737
737
  expect(markdown2Html(input)).toBe(expected)
738
738
  })
739
739
 
@@ -744,7 +744,7 @@ describe('Markdown2Html', () => {
744
744
  last_update: '2021-05-10T09:15:49',
745
745
  body: 'https://hive.blog/trending/books'
746
746
  }
747
- const expected = '<p><a class=\"markdown-tag-link\" data-filter=\"trending\" data-tag=\"books\">/trending/books</a></p>'
747
+ const expected = '<p dir=\"auto\"><a class=\"markdown-tag-link\" data-filter=\"trending\" data-tag=\"books\">/trending/books</a></p>'
748
748
  expect(markdown2Html(input)).toBe(expected)
749
749
  })
750
750
 
@@ -755,7 +755,7 @@ describe('Markdown2Html', () => {
755
755
  last_update: '2021-05-10T09:15:49',
756
756
  body: '<a href="/trending/books">trending books</a>'
757
757
  }
758
- const expected = '<p><a class=\"markdown-tag-link\" data-filter=\"trending\" data-tag=\"books\">trending books</a></p>'
758
+ const expected = '<p dir=\"auto\"><a class=\"markdown-tag-link\" data-filter=\"trending\" data-tag=\"books\">trending books</a></p>'
759
759
  expect(markdown2Html(input)).toBe(expected)
760
760
  })
761
761
 
@@ -781,7 +781,7 @@ describe('Markdown2Html', () => {
781
781
  last_update: '2021-08-18T09:15:49',
782
782
  body: 'https://www.loom.com/share/5bbdeb480ba84e65b1b3de8c190e2003'
783
783
  }
784
- const expected = '<p><a class=\"markdown-video-link markdown-video-link-loom\"><iframe frameborder=\"0\" allowfullscreen=\"true\" src=\"https://www.loom.com/embed/5bbdeb480ba84e65b1b3de8c190e2003\" sandbox=\"allow-scripts allow-same-origin allow-popups\"></iframe></a></p>'
784
+ const expected = '<p dir=\"auto\"><a class=\"markdown-video-link markdown-video-link-loom\"><iframe frameborder=\"0\" allowfullscreen=\"true\" src=\"https://www.loom.com/embed/5bbdeb480ba84e65b1b3de8c190e2003\" sandbox=\"allow-scripts allow-same-origin allow-popups\"></iframe></a></p>'
785
785
  expect(markdown2Html(input)).toBe(expected)
786
786
  })
787
787
 
@@ -801,9 +801,9 @@ describe('Markdown2Html', () => {
801
801
  author: 'foo357',
802
802
  permlink: 'bar357',
803
803
  last_update: '2021-08-18T09:15:49',
804
- body: '<p><strong>THINGS WE CAN DO TO PREPARE FOR INDEFINITE LOCKDOWNS<br></strong>https://peakd.com/hive-123046/@ecotrain/ecotrain-question-of-the-week-5-2tie-up-post-things-we-can-do-to-prepare-for-indefinite-lockdowns </p>'
804
+ body: '<p dir=\"auto\"><strong>THINGS WE CAN DO TO PREPARE FOR INDEFINITE LOCKDOWNS<br></strong>https://peakd.com/hive-123046/@ecotrain/ecotrain-question-of-the-week-5-2tie-up-post-things-we-can-do-to-prepare-for-indefinite-lockdowns </p>'
805
805
  }
806
- const expected = '<p><strong>THINGS WE CAN DO TO PREPARE FOR INDEFINITE LOCKDOWNS<br /></strong><a data-tag=\"hive-123046\" data-author=\"ecotrain\" data-permlink=\"ecotrain-question-of-the-week-5-2tie-up-post-things-we-can-do-to-prepare-for-indefinite-lockdowns\" class=\"markdown-post-link\">/@ecotrain/ecotrain-question-of-the-week-5-2tie-up-post-things-we-can-do-to-prepare-for-indefinite-lockdowns</a></p>'
806
+ const expected = '<p dir=\"auto\"><strong>THINGS WE CAN DO TO PREPARE FOR INDEFINITE LOCKDOWNS<br /></strong><a data-tag=\"hive-123046\" data-author=\"ecotrain\" data-permlink=\"ecotrain-question-of-the-week-5-2tie-up-post-things-we-can-do-to-prepare-for-indefinite-lockdowns\" class=\"markdown-post-link\">/@ecotrain/ecotrain-question-of-the-week-5-2tie-up-post-things-we-can-do-to-prepare-for-indefinite-lockdowns</a></p>'
807
807
  expect(markdown2Html(input)).toBe(expected)
808
808
  })
809
809
 
@@ -812,10 +812,10 @@ describe('Markdown2Html', () => {
812
812
  author: 'foo358',
813
813
  permlink: 'bar358',
814
814
  last_update: '2021-08-18T09:15:49',
815
- body: `<p><strong>It's a Secret, But is it good to have secrets?</strong><br>
815
+ body: `<p dir=\"auto\"><strong>It's a Secret, But is it good to have secrets?</strong><br>
816
816
  https://peakd.com/hive-123046/@ecotrain/ecotrain-question-of-the-week-season-5-1tie-up-post-it-s-a-secret-but-is-it-good-to-have-secrets </p> `
817
817
  }
818
- const expected = '<p><strong>It\'s a Secret, But is it good to have secrets?</strong><br /><a data-tag=\"hive-123046\" data-author=\"ecotrain\" data-permlink=\"ecotrain-question-of-the-week-season-5-1tie-up-post-it-s-a-secret-but-is-it-good-to-have-secrets\" class=\"markdown-post-link\">/@ecotrain/ecotrain-question-of-the-week-season-5-1tie-up-post-it-s-a-secret-but-is-it-good-to-have-secrets</a></p>'
818
+ const expected = '<p dir=\"auto\"><strong>It\'s a Secret, But is it good to have secrets?</strong><br /><a data-tag=\"hive-123046\" data-author=\"ecotrain\" data-permlink=\"ecotrain-question-of-the-week-season-5-1tie-up-post-it-s-a-secret-but-is-it-good-to-have-secrets\" class=\"markdown-post-link\">/@ecotrain/ecotrain-question-of-the-week-season-5-1tie-up-post-it-s-a-secret-but-is-it-good-to-have-secrets</a></p>'
819
819
  expect(markdown2Html(input)).toBe(expected)
820
820
  })
821
821
 
@@ -826,7 +826,7 @@ describe('Markdown2Html', () => {
826
826
  last_update: '2021-10-23T09:15:21',
827
827
  body: 'this is link <iframe loading="lazy" src="https://aureal-embed.web.app/535939" width="100%" height="200" frameborder="0" data-rocket-lazyload="fitvidscompatible" class="lazyloaded" data-ll-status="loaded"></iframe>'
828
828
  }
829
- const expected = '<p>this is link <iframe src=\"https://aureal-embed.web.app/535939\" frameborder=\"0\" class=\"lazyloaded\"></iframe></p>'
829
+ const expected = '<p dir=\"auto\">this is link <iframe src=\"https://aureal-embed.web.app/535939\" frameborder=\"0\" class=\"lazyloaded\"></iframe></p>'
830
830
 
831
831
  expect(markdown2Html(input)).toBe(expected)
832
832
  })
@@ -838,7 +838,7 @@ describe('Markdown2Html', () => {
838
838
  last_update: '2021-10-23T09:15:21',
839
839
  body: 'this is link @demo/test for internal'
840
840
  }
841
- const expected = '<p><span>this is link <a class=\"markdown-post-link\" data-author=\"demo\" data-tag=\"post\" data-permlink=\"test\">@demo/test</a> for internal</span></p>'
841
+ const expected = '<p dir=\"auto\"><span>this is link <a class=\"markdown-post-link\" data-author=\"demo\" data-tag=\"post\" data-permlink=\"test\">@demo/test</a> for internal</span></p>'
842
842
 
843
843
  expect(markdown2Html(input)).toBe(expected)
844
844
  })
@@ -850,7 +850,7 @@ describe('Markdown2Html', () => {
850
850
  last_update: '2021-10-23T09:15:21',
851
851
  body: 'this is link /@demo/test for internal'
852
852
  }
853
- const expected = '<p><span>this is link <a class=\"markdown-post-link\" data-author=\"demo\" data-tag=\"post\" data-permlink=\"test\">@demo/test</a> for internal</span></p>'
853
+ const expected = '<p dir=\"auto\"><span>this is link <a class=\"markdown-post-link\" data-author=\"demo\" data-tag=\"post\" data-permlink=\"test\">@demo/test</a> for internal</span></p>'
854
854
 
855
855
  expect(markdown2Html(input)).toBe(expected)
856
856
  })
@@ -862,7 +862,7 @@ describe('Markdown2Html', () => {
862
862
  last_update: '2021-10-23T09:15:21',
863
863
  body: '@demo/test for internal'
864
864
  }
865
- const expected = '<p><span> <a class=\"markdown-post-link\" data-author=\"demo\" data-tag=\"post\" data-permlink=\"test\">@demo/test</a> for internal</span></p>'
865
+ const expected = '<p dir=\"auto\"><span> <a class=\"markdown-post-link\" data-author=\"demo\" data-tag=\"post\" data-permlink=\"test\">@demo/test</a> for internal</span></p>'
866
866
 
867
867
  expect(markdown2Html(input)).toBe(expected)
868
868
  })
@@ -874,7 +874,7 @@ describe('Markdown2Html', () => {
874
874
  last_update: '2021-10-23T09:15:21',
875
875
  body: '/@demo/test for internal'
876
876
  }
877
- const expected = '<p><span> <a class=\"markdown-post-link\" data-author=\"demo\" data-tag=\"post\" data-permlink=\"test\">@demo/test</a> for internal</span></p>'
877
+ const expected = '<p dir=\"auto\"><span> <a class=\"markdown-post-link\" data-author=\"demo\" data-tag=\"post\" data-permlink=\"test\">@demo/test</a> for internal</span></p>'
878
878
 
879
879
  expect(markdown2Html(input)).toBe(expected)
880
880
  })
@@ -886,7 +886,7 @@ describe('Markdown2Html', () => {
886
886
  last_update: '2021-10-23T09:15:21',
887
887
  body: '@demo/wallet for internal'
888
888
  }
889
- const expected = '<p><span> <a class=\"markdown-profile-link\" href=\"/@demo/wallet\">@demo/wallet</a> for internal</span></p>'
889
+ const expected = '<p dir=\"auto\"><span> <a class=\"markdown-profile-link\" href=\"/@demo/wallet\">@demo/wallet</a> for internal</span></p>'
890
890
 
891
891
  expect(markdown2Html(input, false)).toBe(expected)
892
892
  })
@@ -898,7 +898,7 @@ describe('Markdown2Html', () => {
898
898
  last_update: '2019-05-10T09:15:21',
899
899
  body: 'https://www.youtube.com/embed/UuyS7YAkECA?start=295&autoplay=1'
900
900
  }
901
- const expected = '<p><a class="markdown-video-link markdown-video-link-youtube" data-embed-src="https://www.youtube.com/embed/UuyS7YAkECA?autoplay=1" data-youtube="UuyS7YAkECA" data-start-time="295"><img class="no-replace video-thumbnail" src="https://images.ecency.com/p/S5Eokt4BcQdk7EHeT1aYjzebg2hC7hkthT45eAMp88bZ44hfAQDm6BtJw2H53aq1Tpn1cu4.png?format=match&amp;mode=fit" /><span class="markdown-video-play"></span></a></p>'
901
+ const expected = '<p dir=\"auto\"><a class="markdown-video-link markdown-video-link-youtube" data-embed-src="https://www.youtube.com/embed/UuyS7YAkECA?autoplay=1" data-youtube="UuyS7YAkECA" data-start-time="295"><img class="no-replace video-thumbnail" src="https://images.ecency.com/p/S5Eokt4BcQdk7EHeT1aYjzebg2hC7hkthT45eAMp88bZ44hfAQDm6BtJw2H53aq1Tpn1cu4.png?format=match&amp;mode=fit" /><span class="markdown-video-play"></span></a></p>'
902
902
 
903
903
  expect(markdown2Html(input)).toBe(expected)
904
904
  })
@@ -910,7 +910,7 @@ describe('Markdown2Html', () => {
910
910
  last_update: '2019-05-10T09:15:21',
911
911
  body: 'direct link https://ecency.com/@ecency/faq?history'
912
912
  }
913
- const expected = '<p>direct link <a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"ecency\" data-permlink=\"faq?history\">@ecency/faq?history</a></p>'
913
+ const expected = '<p dir=\"auto\">direct link <a class=\"markdown-post-link\" data-tag=\"post\" data-author=\"ecency\" data-permlink=\"faq?history\">@ecency/faq?history</a></p>'
914
914
 
915
915
  expect(markdown2Html(input)).toBe(expected)
916
916
  })
@@ -922,7 +922,7 @@ describe('Markdown2Html', () => {
922
922
  last_update: '2019-05-10T09:15:21',
923
923
  body: 'direct link https://ecency.com/@ecency/posts?q=games'
924
924
  }
925
- const expected = '<p>direct link <a href=\"https://ecency.com/@ecency/posts?q=games\" class=\"markdown-profile-link\">@ecency/posts?q=games</a></p>'
925
+ const expected = '<p dir=\"auto\">direct link <a href=\"https://ecency.com/@ecency/posts?q=games\" class=\"markdown-profile-link\">@ecency/posts?q=games</a></p>'
926
926
 
927
927
  expect(markdown2Html(input)).toBe(expected)
928
928
  })
@@ -934,7 +934,7 @@ describe('Markdown2Html', () => {
934
934
  last_update: '2019-05-10T09:15:21',
935
935
  body: 'this is link [What is HIVE](#WhatHive) and locatino ## 1 <a data-id="WhatHive"></a>What is HIVE?'
936
936
  }
937
- const expected = '<p>this is link <a href=\"#WhatHive\" class=\"markdown-internal-link\">What is HIVE</a> and locatino ## 1 <a data-id=\"WhatHive\"></a>What is HIVE?</p>'
937
+ const expected = '<p dir=\"auto\">this is link <a href=\"#WhatHive\" class=\"markdown-internal-link\">What is HIVE</a> and locatino ## 1 <a data-id=\"WhatHive\"></a>What is HIVE?</p>'
938
938
 
939
939
  expect(markdown2Html(input, false)).toBe(expected)
940
940
  })
@@ -946,7 +946,7 @@ describe('Markdown2Html', () => {
946
946
  last_update: '2019-05-10T09:15:21',
947
947
  body: 'this is link https://inleo.io/@godfish/close-range-reflections'
948
948
  }
949
- const expected = '<p>this is link <a href="/post/@godfish/close-range-reflections" class="markdown-post-link">@godfish/close-range-reflections</a></p>'
949
+ const expected = '<p dir=\"auto\">this is link <a href="/post/@godfish/close-range-reflections" class="markdown-post-link">@godfish/close-range-reflections</a></p>'
950
950
 
951
951
  expect(markdown2Html(input, false)).toBe(expected)
952
952
  })
@@ -967,7 +967,7 @@ describe('Markdown2Html', () => {
967
967
 
968
968
 
969
969
  it('Rumble embed URL', () => {
970
- const expected = "<p><a class=\"markdown-video-link\" data-embed-src=\"https://www.rumble.com/embed/vhwsp4/?pub=4\"><span class=\"markdown-video-play\"></span></a></p>"
970
+ const expected = "<p dir=\"auto\"><a class=\"markdown-video-link\" data-embed-src=\"https://www.rumble.com/embed/vhwsp4/?pub=4\"><span class=\"markdown-video-play\"></span></a></p>"
971
971
  let input = {
972
972
  author: 'foo350y',
973
973
  permlink: 'bar350y',
@@ -1009,7 +1009,7 @@ describe('Markdown2Html', () => {
1009
1009
  })
1010
1010
 
1011
1011
  it('Brightreon embed URL', () => {
1012
- const expected = "<p><a class=\"markdown-video-link\" data-embed-src=\"https://www.brighteon.com/embed/5821540656001\"><span class=\"markdown-video-play\"></span></a></p>"
1012
+ const expected = "<p dir=\"auto\"><a class=\"markdown-video-link\" data-embed-src=\"https://www.brighteon.com/embed/5821540656001\"><span class=\"markdown-video-play\"></span></a></p>"
1013
1013
  let input = {
1014
1014
  author: 'foo351y',
1015
1015
  permlink: 'bar351y',
@@ -1020,7 +1020,7 @@ describe('Markdown2Html', () => {
1020
1020
  })
1021
1021
 
1022
1022
  it('Brightreon page URL', () => {
1023
- const expected = "<p><a class=\"markdown-video-link\" data-embed-src=\"https://www.brighteon.com/embed/5821540656001\"><span class=\"markdown-video-play\"></span></a></p>"
1023
+ const expected = "<p dir=\"auto\"><a class=\"markdown-video-link\" data-embed-src=\"https://www.brighteon.com/embed/5821540656001\"><span class=\"markdown-video-play\"></span></a></p>"
1024
1024
  let input = {
1025
1025
  author: 'foo351z',
1026
1026
  permlink: 'bar351z',
@@ -1054,7 +1054,7 @@ describe('Markdown2Html', () => {
1054
1054
  last_update: '2019-05-10T09:15:21',
1055
1055
  body: '<a href=\'javascript:void(0)\'>click here</a>'
1056
1056
  }
1057
- const expected = '<p><a>click here</a></p>'
1057
+ const expected = '<p dir=\"auto\"><a>click here</a></p>'
1058
1058
 
1059
1059
  expect(markdown2Html(input)).toBe(expected)
1060
1060
  })
@@ -1078,7 +1078,7 @@ describe('Markdown2Html', () => {
1078
1078
  last_update: '2019-05-10T09:15:21',
1079
1079
  body: `<a title="Foo" onclick="document.bar()">Click</a>`
1080
1080
  }
1081
- const expected = '<p><a title="Foo">Click</a></p>'
1081
+ const expected = '<p dir=\"auto\"><a title="Foo">Click</a></p>'
1082
1082
 
1083
1083
  expect(markdown2Html(input)).toBe(expected)
1084
1084
  })
@@ -1090,7 +1090,7 @@ describe('Markdown2Html', () => {
1090
1090
  last_update: '2019-05-10T09:15:21',
1091
1091
  body: `<a title="Foo" href="javascript:void(0)">Click</a>`
1092
1092
  }
1093
- const expected = '<p><a title="Foo">Click</a></p>'
1093
+ const expected = '<p dir=\"auto\"><a title="Foo">Click</a></p>'
1094
1094
 
1095
1095
  expect(markdown2Html(input)).toBe(expected)
1096
1096
  })
@@ -1149,7 +1149,7 @@ describe('Markdown2Html', () => {
1149
1149
  last_update: '2019-05-10T09:15:21',
1150
1150
  body: 'https://img.esteem.ws/bbq3ob1idy.png <a href="https://steemit.com/esteem/@esteemapp/esteem-monthly-guest-curation-program-4">fooo</a> <a href="/esteem/@esteemapp/esteem-monthly-guest-curation-program-4">bar</a> <a href="http://external.com/loromoro">baz</a> #lorem @ipsum <a href=\'https://steemit.com/~witnesses\'>vote me</a>'
1151
1151
  }
1152
- const expected = '<p><img class="markdown-img-link" src="https://images.ecency.com/p/o1AJ9qDyyJNSpZWhUgGYc3MngFqoAMwgbeMkkd8SVxyfRVjiN.png?format=match&amp;mode=fit" /> <a href="https://steemit.com/esteem/@esteemapp/esteem-monthly-guest-curation-program-4" class="markdown-external-link" target="_blank" rel="noopener">fooo</a> <a href="/esteem/@esteemapp/esteem-monthly-guest-curation-program-4" class="markdown-post-link">bar</a> <a href="http://external.com/loromoro" class="markdown-external-link" target="_blank" rel="noopener">baz</a><span> <a class="markdown-tag-link" href="/trending/lorem">#lorem</a> <a class="markdown-author-link" href="/@ipsum">@ipsum</a> </span><a href="https://steemit.com/~witnesses" class="markdown-external-link" target="_blank" rel="noopener">vote me</a></p>'
1152
+ const expected = '<p dir=\"auto\"><img class="markdown-img-link" src="https://images.ecency.com/p/o1AJ9qDyyJNSpZWhUgGYc3MngFqoAMwgbeMkkd8SVxyfRVjiN.png?format=match&amp;mode=fit" /> <a href="https://steemit.com/esteem/@esteemapp/esteem-monthly-guest-curation-program-4" class="markdown-external-link" target="_blank" rel="noopener">fooo</a> <a href="/esteem/@esteemapp/esteem-monthly-guest-curation-program-4" class="markdown-post-link">bar</a> <a href="http://external.com/loromoro" class="markdown-external-link" target="_blank" rel="noopener">baz</a><span> <a class="markdown-tag-link" href="/trending/lorem">#lorem</a> <a class="markdown-author-link" href="/@ipsum">@ipsum</a> </span><a href="https://steemit.com/~witnesses" class="markdown-external-link" target="_blank" rel="noopener">vote me</a></p>'
1153
1153
 
1154
1154
  expect(markdown2Html(input, false)).toBe(expected)
1155
1155
  })
@@ -1161,7 +1161,7 @@ describe('Markdown2Html', () => {
1161
1161
  last_update: '2019-05-10T09:15:21',
1162
1162
  body: '[Voice: the criteria for success or failure](https://app.voice.com/post/@lukestokes/voice-the-criteria-for-success-or-failure-1597453134-597)'
1163
1163
  }
1164
- const expected = '<p><a href="https://app.voice.com/post/@lukestokes/voice-the-criteria-for-success-or-failure-1597453134-597" class="markdown-external-link" target="_blank" rel="noopener">Voice: the criteria for success or failure</a></p>'
1164
+ const expected = '<p dir=\"auto\"><a href="https://app.voice.com/post/@lukestokes/voice-the-criteria-for-success-or-failure-1597453134-597" class="markdown-external-link" target="_blank" rel="noopener">Voice: the criteria for success or failure</a></p>'
1165
1165
 
1166
1166
  expect(markdown2Html(input, false)).toBe(expected)
1167
1167
  })
@@ -1173,7 +1173,7 @@ describe('Markdown2Html', () => {
1173
1173
  last_update: '2019-05-10T09:15:21',
1174
1174
  body: '[Voice: the criteria for success or failure](https://app.voice.com/@lukestokes/voice-the-criteria-for-success-or-failure-1597453134-597)'
1175
1175
  }
1176
- const expected = '<p><a href="https://app.voice.com/@lukestokes/voice-the-criteria-for-success-or-failure-1597453134-597" class="markdown-external-link" target="_blank" rel="noopener">Voice: the criteria for success or failure</a></p>'
1176
+ const expected = '<p dir=\"auto\"><a href="https://app.voice.com/@lukestokes/voice-the-criteria-for-success-or-failure-1597453134-597" class="markdown-external-link" target="_blank" rel="noopener">Voice: the criteria for success or failure</a></p>'
1177
1177
 
1178
1178
  expect(markdown2Html(input, false)).toBe(expected)
1179
1179
  })
@@ -1185,7 +1185,7 @@ describe('Markdown2Html', () => {
1185
1185
  last_update: '2021-05-10T09:15:49',
1186
1186
  body: '<a href="/trending/books">trending books</a>'
1187
1187
  }
1188
- const expected = '<p><a href=\"/trending/books\" class=\"markdown-tag-link\">trending books</a></p>'
1188
+ const expected = '<p dir=\"auto\"><a href=\"/trending/books\" class=\"markdown-tag-link\">trending books</a></p>'
1189
1189
  expect(markdown2Html(input, false)).toBe(expected)
1190
1190
  })
1191
1191
  })
@@ -1199,7 +1199,7 @@ describe('Markdown2Html', () => {
1199
1199
  last_update: '2019-05-10T09:15:21',
1200
1200
  body: 'hello lorem ipsum \n Posted using [Partiko Android](https://partiko.app/referral/aftabkhan10) \n Posted using [Dapplr](https://app.dapplr.in/L55YHRuX4jKJ2SSk8) \n Posted Using [LeoFinance](https://leofinance.io/@taskmaster4450/is-defi-for-real) \n Posted with [STEMGeeks](https://stemgeeks.net) \n <center><sub>[Posted Using Aeneas.Blog](https://www.aeneas.blog/@rollie1212/sryptobrewmaster-weekend-rewards-3)</sub></center> \n <center><sub>Posted via [weedcash.network](https://www.weedcash.network/@cryptounicorn420/thc-and-nft-rising-star-hive-blockchain-game)</sub></center>'
1201
1201
  }
1202
- const expected = '<p>hello lorem ipsum</p>'
1202
+ const expected = '<p dir=\"auto\">hello lorem ipsum</p>'
1203
1203
 
1204
1204
  expect(markdown2Html(input)).toBe(expected)
1205
1205
  })