Beispiel #1
0
def test_remove_html_tags_bold():
    node = converter.NodeText('<b>Link</b>')
    node.remove_html_tags()
    assert node.txt == 'Link'
Beispiel #2
0
def test_workflowy_tags_w_markdown():
    assert converter.NodeText('## Header @fup <i>*italics*</i>').format().txt == '## Header *italics*'
Beispiel #3
0
def test_remove_double_space():
    assert converter.NodeText('One      Two').remove_space().txt == 'One Two'
Beispiel #4
0
def test_workflowy_tags_and_html():
    node = converter.NodeText('#p <b>@Figure</b> @wip @fup #word-count')
    assert node.format().txt == '**Figure**'
Beispiel #5
0
def test_remove_workflowy_tags():
    assert converter.NodeText('#p blah').remove_workflowy_tags().remove_space().txt == '#p blah'
    assert converter.NodeText('#p blah @Figure').remove_workflowy_tags().remove_space().txt == '#p blah @Figure'
Beispiel #6
0
def test_remove_html_tags_underline():
    node = converter.NodeText('<u>Link</u>')
    node.remove_html_tags()
    assert node.txt == 'Link'
Beispiel #7
0
def test_reformat_workflowy_tag():
    assert converter.NodeText('@Figure').reformat_workflow_tags().txt == '**Figure**'
    assert converter.NodeText('@Figure_1').reformat_workflow_tags().txt == '**Figure 1**'
    assert converter.NodeText('@Table_1A').reformat_workflow_tags().txt == '**Table 1A**'
    assert converter.NodeText('@File').reformat_workflow_tags().txt == '**File**'
    assert converter.NodeText('@Figure blah blah @File_1').reformat_workflow_tags().txt == '**Figure** blah blah **File 1**'
Beispiel #8
0
def test_remove_html_tags_italics():
    node = converter.NodeText('<i>Link</i>')
    node.remove_html_tags()
    assert node.txt == 'Link'