summaryrefslogtreecommitdiff
path: root/test/links_test.rb
AgeCommit message (Collapse)Author
2024-05-16add test for link macro inside xref shorthandDan Allen
2024-05-12resolves #4570 fix crash when parsing xref shorthand when target starts with ↵Dan Allen
URL protocol (PR #4585)
2024-05-12split tests for bare URI scheme to make intention more clearDan Allen
2024-03-15add test for autolink that contains text enclosed in angle brackets and ends ↵Dan Allen
with /
2024-02-20resolves #4468 treat bare URL enclosed in angle brackets as unconstrained ↵Dan Allen
syntax (PR #4553)
2023-04-26catalog inline ref defined using anchor macro even when resolved reftext is ↵Dan Allen
empty
2023-04-26add test to verify parser correctly handles shorthand inline ref when ↵Dan Allen
resolved reftext is empty
2023-04-25slightly simplify implicit link processing by separating implicit and ↵Dan Allen
explicit match
2023-04-25don't swallow square brackets when processing escaped URL macroDan Allen
2023-04-18resolves #4393 avoid matching numeric character references when searching ↵孙茂胤 (Sun, Maoyin)
for # in xref target (PR #4394)
2022-02-28if path is included both partially and fully, store it with true value ↵Dan Allen
(included fully) in includes table of document catalog
2021-07-31use single quoted string or use %() for interpolated string in test suiteDan Allen
2021-07-31omit_parentheses where possible in test codeDan Allen
2021-05-31use assert_empty/refute_empty where possible in test suiteDan Allen
2021-05-28remove excess empty lines in test suite; use multiple lines for class ↵Dan Allen
definitions [skip ci]
2021-05-28use automatic link text if ID in shorthand xref is followed by dangling commaDan Allen
2021-05-27remove or mark unused block arguments in test suite; fix missing logger ↵Dan Allen
assertions
2021-05-25use single-quoted strings where possible in test suiteDan Allen
2021-05-12add basic text for automatic link text for xref macro shorthandDan Allen
2021-04-30leave empty line after magic comment [skip ci]Dan Allen
2021-04-27use document ID as linkend for self xref in DocBook output, auto-generating ↵Dan Allen
one if necessary (PR #4041)
2021-04-27resolves #3860 don't include trailing punctuation in target of autolink (PR ↵Dan Allen
#4040)
2021-04-27handle case when self xref without link text is inside AsciiDoc table cellDan Allen
2021-04-26resolves #4032 use xreftext of document as fallback link text for ↵Dan Allen
inter-document xref that resolves to current document (PR #4038)
2021-04-23add negative tests for problem reported in #4032Dan Allen
2021-04-15add test to verify double underscore in target of xref macro and xref ↵Dan Allen
shorthand can be escaped using backslash
2020-11-14verify link macros support id and role attributesDan Allen
2020-10-27remove stray ' in test fixtureDan Allen
2020-07-17resolves #3376 allow a URL macro to have a preceding single or double quote ↵Dan Allen
(PR #3717)
2020-07-17resolves #3543 short-circuit xreftext containing a circular reference path ↵Dan Allen
(PR #3712)
2020-01-31resolves #3555 fix errant reference warning in compat mode (PR #3556)Dan Allen
2019-06-14resolves #3331 fix parsing of wrapped link and xref text PR (#3334)Dan Allen
2019-04-22add additional test for xreflabel on anchor in DocBook outputDan Allen
2019-04-13resolves #3254 fix crash when resolving ID from text and a candidate ↵Dan Allen
contains an unresolved xref (PR #3255) - prevent nested calls to resolve_id from populating reftexts table - only call resolve_id if fragment matches requirements (contains space or uppercase character) - add additional tests to cover scenarios
2019-04-04resolves #3231 assume implicit AsciiDoc extension on interdoc xref macro ↵Dan Allen
target with no extension (PR #3236)
2019-03-20log possible invalid reference at info level instead of debug levelDan Allen
- use the info level to keep track of decisions that affect content, but under normal circumstances can likely be ignored
2019-03-14resolves #1444 rename header_footer option to standalone (PR #3146)Dan Allen
* still honor header_footer option as fallback for backwards compatibility
2019-03-04refactor implicit link processing (PR #3126)Dan Allen
- use capture to avoid running subsequent regular expression (UriTerminatorRx) - only check if target ends with :// if target was modified - update assertions to check that terminating character(s) got moved outside URL
2019-02-24only map unparsed attrlist of inline macro to target when format is shortDan Allen
2019-02-19resolves #3084 only store :refs, not :ids, in document catalog (PR #3079)Dan Allen
* remove the logic that registers entries in :ids table of the document catalog * don't attempt to compute the reftext when registering an xref (as this information is available from the referenced node and can be retrieved on demnd) * add a Document#resolve_id method to look up ID by reference text (reftext or title); cache the result of lookups once parsing is complete * always look for existing IDs using :refs table (when checking for a duplicate or whether a target exists) * leave the :ids table empty to avoid breaking existing programs and extensions * update tests * add test to verify :ids table is always empty
2019-02-11resolves #3021 assume any shorthand interdocument xref is a source-to-source ↵Dan Allen
reference (PR #3022) - always assume the target of a shorthand interdocument xref is a reference to an AsciiDoc document (source-to-source) - if the target of a formal xref macro has a file extension, assume it's a path reference - never assume the target of a formal xref macro is a path reference unless a file extension or fragment is present - update tests
2019-02-10use indented (squiggly) heredoc strings in links_testDan Allen
2019-02-10resolves #3054 never mutate strings; add `frozen_string_literal: true` ↵Dan Allen
comment to source files (PR #3055) - replace gsub! and sub! with gsub and sub, respectively - add `frozen_string_literal: true` magic comment to all Ruby source files - see https://www.mikeperham.com/2018/02/28/ruby-optimization-with-one-magic-comment/
2019-02-09resolves #3030 separate the -v and -w CLI flagsDan Allen
- use -v to set logger level to debug - use -w to enable pedantic Ruby warnings (aka $VERBOSE = true)
2019-02-05resolves #3005 remove the converter for the docbook45 backend (PR #3040)Dan Allen
- remove the DocBook45Converter class - remove accomodations in DocBook5Converter for DocBook 4.5 - don't register the docbook45 backend name in the converter registry - drop docbook45 from the backend CLI option values - don't mention DocBook 4.5 in the man page - don't mention DocBook 4.5 in the CLI usage statement - update tests to use DocBook 5 instead of DocBook 4.5
2019-01-26use the term newline(s) instead of endline(s) [skip ci]Dan Allen
2019-01-15use more relevant test case for when target of inter-document xref has ↵Dan Allen
unrecognized extension
2019-01-06switch to modern hash syntaxDan Allen
- switch to modern hash syntax (from :key => value to key: value) - put space inside hash brackets (from {key: value} to { key: value } - use dangling comma on last entry of multi-line hash
2019-01-06use require_relative instead of modifying $LOAD_PATHDan Allen
- use require_relative in place of require when it relied on $LOAD_PATH manipulation - configure bin scripts to work with require_relative - rename ROOT_PATH to ROOT_DIR - rename DATA_PATH to DATA_DIR - rename STYLESHEETS_DATA_PATH to STYLESHEETS_DIR - define LIB_DIR - simplify test helper require and setup - add bindir helper to test suite - remove unneeded constants in test helper - reorder autoload statements - require version directly instead of autoloading
2019-01-06remove workarounds for Ruby < 2.3Dan Allen
- remove constants for differentiating between Ruby versions - remove fallback assignment for RUBY_ENGINE constant - remove rubygems require - use unicode character properties in regular expressions (e.g., \p{Word}) - remove COERCE_ENCODING constant - always set FORCE_ENCODING constant to true unless default external encoding is not UTF-8 - remove workaround for computing line length - use lines method instead of lines.entries to get lines for string - always normalize lines - check if JRuby class is defined instead of checking for JRuby engine - remove global RUBY_ENGINE_JRUBY constant - move RUBY_ENGINE_OPAL constant inside Asciidoctor module - remove magic encoding comments (since default script encoding is UTF-8) - remove workaround when printing encoding information - remove fallback assignments for passthrough escape characters - remove Ruby core backports (only leave Asciidoctor-specific extensions) - use __dir__ instead of File.dirname __FILE__ - use Float#truncate to truncate column widths - override Float#truncate on Ruby 2.3 to implement precision argument - remove concurrent/hash backport - simplify class_for_name helper - don't call to_sym on constants returned from constants method - remove unnecessary aliasing of regexp match variables; use magic variable instead (e.g., m = $~) - remove workaround for sub_specialchars to accomodate gsub with map argument - remove comment about %:z placeholder for strftime - don't call .to_a on return value of Hash#keys - get home directory using Dir.home - remove exceptions and exclusions for Ruby < 2 in test suite - update list of supported Ruby engines and versions in READMEs - update ruby versions in run-tests.sh