moinwiki / moin

MoinMoin Wiki Development (2.0+), unstable, for production please use 1.9.x.
https://moinmo.in/
Other
308 stars 92 forks source link

meta display of some Item Links lack leading namespace #1411

Closed RogerHaase closed 1 year ago

RogerHaase commented 1 year ago

The meta data view for many items have an invalid display of Item Links. The show view of the item correctly links to the target item with a leading namespace; but in the meta view the item name is grayed because the leading namespace is missing.

For example the markdown meta view shows invalid item links to creole, html, moin/HighlighterList, MoinWikiMacros.

RogerHaase commented 1 year ago

adding a new moin/subitem or rst/subitem item to help-en results in test failure. workaround for rst/subitem shown below

def test_dump_help(load_help):
    moin_dir, artifact_dir = get_dirs('cli')
    help_dir = Path('my_help')
    source_help_dir = moin_dir / 'src' / 'moin' / 'help'
    with open(source_help_dir / 'en' / 'Home.data', newline='') as f:
        crlf_option = '--crlf' if '\r\n' in f.read() else '--no-crlf'
    for help_subdir in ['common', 'en']:
        help_subdir_path = help_dir / help_subdir
        if not help_subdir_path.exists():
            help_subdir_path.mkdir(parents=True)
        dump_help = run(['moin', 'dump-help', '-n', help_subdir, '-p', help_dir, crlf_option])
        assert_p_succcess(dump_help)
        source_help_subdir = source_help_dir / help_subdir
        expected_data_file_names = set([p.name for p in source_help_subdir.glob('*.data')])
        # TODO enable next two lines in #1394
        # data_file_names = set([p.name for p in help_subdir_path.glob('*.data')])
        # assert expected_data_file_names == data_file_names
        for data_file_name in expected_data_file_names:
            # TODO remove next 3 lines - missing leading help-en in transclusions
            # ~ if data_file_name in ['OtherTextItems.data', 'rst%2fsubitem.data', ]:
            if data_file_name in ['rst%2fsubitem.data', ]:
                print('==== data_file_name = %s' % data_file_name)
                continue
          with open(help_subdir_path / data_file_name, 'rb') as f:

E FileNotFoundError: [Errno 2] No such file or directory: 'my_help\en\moin%2fsubitem.data'