<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>423976</bug_id>
          
          <creation_ts>2020-07-07 19:17:32 +0000</creation_ts>
          <short_desc>When formatting IDs, non-word characters should be used as word separators</short_desc>
          <delta_ts>2020-07-09 12:43:42 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>KBibTeX</product>
          <component>User interface</component>
          <version>git (master)</version>
          <rep_platform>Manjaro</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="nobodyinperson">nobodyinperson</reporter>
          <assigned_to name="Thomas Fischer">fischer</assigned_to>
          
          
          <cf_commitlink>https://invent.kde.org/office/kbibtex/commit/6d6ba2fb63308b4f929a94741ea32d0f066b0925</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1942283</commentid>
    <comment_count>0</comment_count>
    <who name="nobodyinperson">nobodyinperson</who>
    <bug_when>2020-07-07 19:17:32 +0000</bug_when>
    <thetext>SUMMARY

When formatting IDs, non-word characters (like dashes, colons, etc...) should be used as word separators. The current behaviour is to split words at whitespace, resulting in non-word characters ending up as part of words in the IDs, which can break autosuggestion in editors and generally doesn&apos;t look nice. IDs should be concise and not contain special characters as they are used for in-code referencing. If a user wants special characters in between words in IDs, there is a configuration option already provided in the ID suggestion editor.

STEPS TO REPRODUCE

1. Use the following example bibtex entry:

@article{testarticle,
	author = {Doe, John},
	title = {{Long-Term Measurements: A Better Technique}},
	year = {2020}
}


2. Create an ID suggestion like &quot;Alw00|Y|Tlw01&quot; (taken from ~/.config/kbibtexrc)  (first lowercased author, 4-digit year, then all title words with small words removed) and set it as default.

3. Format the ID of the entry.

OBSERVED RESULT

The ID is formatted as &quot;doe2020long-termmeasurements:bettertechnique&quot;

EXPECTED RESULT

ID gets formatted as &quot;doe2020longtermmeasurementsbettertechnique&quot;

SOFTWARE/OS VERSIONS

up-to-date Manjaro XFCE 

ADDITIONAL INFORMATION

kbibtex-git built from the AUR with this PKGBUILD fix: https://aur.archlinux.org/packages/kbibtex-git/#comment-754938</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1942529</commentid>
    <comment_count>1</comment_count>
    <who name="Thomas Fischer">fischer</who>
    <bug_when>2020-07-08 19:16:26 +0000</bug_when>
    <thetext>Patch is under way, see merge request 1 at invent.kde.org:
https://invent.kde.org/office/kbibtex/-/merge_requests/1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1942599</commentid>
    <comment_count>2</comment_count>
    <who name="Thomas Fischer">fischer</who>
    <bug_when>2020-07-09 10:04:40 +0000</bug_when>
    <thetext>Git commit 6d6ba2fb63308b4f929a94741ea32d0f066b0925 by Thomas Fischer, on behalf of Yann Büchau.
Committed on 09/07/2020 at 10:04.
Pushed by thomasfischer into branch &apos;master&apos;.

ID suggestions: separate words correctly, not only by whitespace

- Use \W+ as title/journal word separator instead of only whitespace
- Enable Unicode support for QRegularExpression

M  +6    -6    src/processing/idsuggestions.cpp

https://invent.kde.org/office/kbibtex/commit/6d6ba2fb63308b4f929a94741ea32d0f066b0925</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1942619</commentid>
    <comment_count>3</comment_count>
    <who name="Thomas Fischer">fischer</who>
    <bug_when>2020-07-09 12:43:42 +0000</bug_when>
    <thetext>Git commit 60584af6ff3dc623cb9b46d1d41460a939cfad9e by Thomas Fischer, on behalf of Yann Büchau.
Committed on 09/07/2020 at 12:29.
Pushed by thomasfischer into branch &apos;kbibtex/0.10&apos;.

ID suggestions: separate words correctly, not only by whitespace

- Use \W+ as title/journal word separator instead of only whitespace
- Enable Unicode support for QRegularExpression

M  +6    -6    src/processing/idsuggestions.cpp

https://invent.kde.org/office/kbibtex/commit/60584af6ff3dc623cb9b46d1d41460a939cfad9e</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>